query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public Builder addOutputs(
int index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.add(index, value);
onChanged();
} else {
outputsBuilder_.addMessage(index, value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"private Output() {}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5838448",
"0.57630724",
"0.56826293",
"0.5669267",
"0.543741",
"0.54236734",
"0.54236734",
"0.54236734",
"0.5379236",
"0.5308372",
"0.5231587",
"0.5192771",
"0.5192771",
"0.5192771",
"0.50789475",
"0.5059578",
"0.5059578",
"0.5059578",
"0.4993983",
"0.4993983",
"0.4993983",
"0.49623787",
"0.4959171",
"0.48892048",
"0.48753598",
"0.48441473",
"0.48280814",
"0.48149517",
"0.48074654",
"0.4801487",
"0.47989202",
"0.4772827",
"0.4762799",
"0.47393438",
"0.47335178",
"0.47335178",
"0.47335178",
"0.47181135",
"0.47069415",
"0.47069415",
"0.47069415",
"0.47003484",
"0.46947685",
"0.46841756",
"0.46841756",
"0.46841756",
"0.46817392",
"0.4678343",
"0.46770355",
"0.46767426",
"0.46752223",
"0.46698317",
"0.46661732",
"0.46656257",
"0.4657912",
"0.46546495",
"0.46461144",
"0.46224284",
"0.46104914",
"0.45881376",
"0.4587276",
"0.4583008",
"0.45825297",
"0.4582054",
"0.4578641",
"0.45745772",
"0.4570418",
"0.4570418",
"0.4570418",
"0.456967",
"0.45683166",
"0.45683166",
"0.45683166",
"0.45641622",
"0.45641622",
"0.45641622",
"0.45520413",
"0.45507932",
"0.45463863",
"0.45460576",
"0.45457408",
"0.4544127",
"0.45391434",
"0.45386416",
"0.45386416",
"0.45386416",
"0.453292",
"0.4529059",
"0.451654",
"0.4514843",
"0.4514843",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4509645",
"0.4503893",
"0.45003295",
"0.44988737",
"0.44984478"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public Builder addOutputs(
org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.add(builderForValue.build());
onChanged();
} else {
outputsBuilder_.addMessage(builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"private Output() {}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}"
] |
[
"0.58390677",
"0.57641685",
"0.5683741",
"0.5667359",
"0.54360783",
"0.54257494",
"0.54257494",
"0.54257494",
"0.5380848",
"0.5309551",
"0.5229671",
"0.5194976",
"0.5194976",
"0.5194976",
"0.5079201",
"0.50610936",
"0.50610936",
"0.50610936",
"0.4995328",
"0.4995328",
"0.4995328",
"0.49638462",
"0.49606925",
"0.4890485",
"0.48770586",
"0.48426294",
"0.48277754",
"0.48166192",
"0.4807759",
"0.48000687",
"0.47999492",
"0.4775044",
"0.47635818",
"0.47408015",
"0.47361687",
"0.47361687",
"0.47361687",
"0.4716556",
"0.4708647",
"0.4708647",
"0.4708647",
"0.4701263",
"0.46962214",
"0.46858025",
"0.46858025",
"0.46858025",
"0.46798655",
"0.4678699",
"0.46782795",
"0.46773142",
"0.4675359",
"0.46701595",
"0.4667506",
"0.46650067",
"0.4656859",
"0.46550223",
"0.4645945",
"0.4624301",
"0.46093017",
"0.45870286",
"0.45860893",
"0.4583507",
"0.45821878",
"0.45813385",
"0.45791638",
"0.45760104",
"0.45732677",
"0.45732677",
"0.45732677",
"0.45708978",
"0.45708978",
"0.45708978",
"0.45681113",
"0.45668057",
"0.45668057",
"0.45668057",
"0.45527592",
"0.45484787",
"0.4546567",
"0.4545563",
"0.4545312",
"0.45440653",
"0.4540355",
"0.45392814",
"0.45392814",
"0.45392814",
"0.45344558",
"0.45269465",
"0.45167732",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45146802",
"0.45146802",
"0.4509327",
"0.45042706",
"0.45015267",
"0.4499468",
"0.44989544"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public Builder addOutputs(
int index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.add(index, builderForValue.build());
onChanged();
} else {
outputsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"private Output() {}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5839294",
"0.5761879",
"0.568135",
"0.5668327",
"0.54366136",
"0.54239696",
"0.54239696",
"0.54239696",
"0.53785956",
"0.53089803",
"0.5230565",
"0.51924884",
"0.51924884",
"0.51924884",
"0.5078679",
"0.50598663",
"0.50598663",
"0.50598663",
"0.4993739",
"0.4993739",
"0.4993739",
"0.49619013",
"0.49583387",
"0.48898363",
"0.4874814",
"0.4842495",
"0.48261663",
"0.48145524",
"0.48063838",
"0.47998536",
"0.4798569",
"0.47727266",
"0.476138",
"0.47393084",
"0.4733455",
"0.4733455",
"0.4733455",
"0.47177455",
"0.47068968",
"0.47068968",
"0.47068968",
"0.4699474",
"0.4693746",
"0.46840978",
"0.46840978",
"0.46840978",
"0.46806166",
"0.46779025",
"0.46768576",
"0.46750754",
"0.46732113",
"0.46691602",
"0.46656036",
"0.46634102",
"0.46569628",
"0.465484",
"0.4646667",
"0.46228305",
"0.4609375",
"0.45865148",
"0.45862263",
"0.45820403",
"0.45813712",
"0.45803708",
"0.4577076",
"0.45746467",
"0.45710364",
"0.45710364",
"0.45710364",
"0.4569009",
"0.45686296",
"0.45686296",
"0.45686296",
"0.4564257",
"0.4564257",
"0.4564257",
"0.45508978",
"0.45498058",
"0.45450208",
"0.45441663",
"0.45441175",
"0.4543071",
"0.45401296",
"0.45398358",
"0.45398358",
"0.45398358",
"0.45323393",
"0.45290437",
"0.45161667",
"0.45140842",
"0.45140842",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45088443",
"0.45013085",
"0.4499925",
"0.44984543",
"0.4498359"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public Builder addAllOutputs(
java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutput> values) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outputs_);
onChanged();
} else {
outputsBuilder_.addAllMessages(values);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"private Output() {}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5839294",
"0.5761879",
"0.568135",
"0.5668327",
"0.54366136",
"0.54239696",
"0.54239696",
"0.54239696",
"0.53785956",
"0.53089803",
"0.5230565",
"0.51924884",
"0.51924884",
"0.51924884",
"0.5078679",
"0.50598663",
"0.50598663",
"0.50598663",
"0.4993739",
"0.4993739",
"0.4993739",
"0.49619013",
"0.49583387",
"0.48898363",
"0.4874814",
"0.4842495",
"0.48261663",
"0.48145524",
"0.48063838",
"0.47998536",
"0.4798569",
"0.47727266",
"0.476138",
"0.47393084",
"0.4733455",
"0.4733455",
"0.4733455",
"0.47177455",
"0.47068968",
"0.47068968",
"0.47068968",
"0.4699474",
"0.4693746",
"0.46840978",
"0.46840978",
"0.46840978",
"0.46806166",
"0.46779025",
"0.46768576",
"0.46750754",
"0.46732113",
"0.46691602",
"0.46656036",
"0.46634102",
"0.46569628",
"0.465484",
"0.4646667",
"0.46228305",
"0.4609375",
"0.45865148",
"0.45862263",
"0.45820403",
"0.45813712",
"0.45803708",
"0.4577076",
"0.45746467",
"0.45710364",
"0.45710364",
"0.45710364",
"0.4569009",
"0.45686296",
"0.45686296",
"0.45686296",
"0.4564257",
"0.4564257",
"0.4564257",
"0.45508978",
"0.45498058",
"0.45450208",
"0.45441663",
"0.45441175",
"0.4543071",
"0.45401296",
"0.45398358",
"0.45398358",
"0.45398358",
"0.45323393",
"0.45290437",
"0.45161667",
"0.45140842",
"0.45140842",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45088443",
"0.45013085",
"0.4499925",
"0.44984543",
"0.4498359"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public Builder clearOutputs() {
if (outputsBuilder_ == null) {
outputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
outputsBuilder_.clear();
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"private Output() {}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5838448",
"0.57630724",
"0.56826293",
"0.5669267",
"0.543741",
"0.54236734",
"0.54236734",
"0.54236734",
"0.5379236",
"0.5308372",
"0.5231587",
"0.5192771",
"0.5192771",
"0.5192771",
"0.50789475",
"0.5059578",
"0.5059578",
"0.5059578",
"0.4993983",
"0.4993983",
"0.4993983",
"0.49623787",
"0.4959171",
"0.48892048",
"0.48753598",
"0.48441473",
"0.48280814",
"0.48149517",
"0.48074654",
"0.4801487",
"0.47989202",
"0.4772827",
"0.4762799",
"0.47393438",
"0.47335178",
"0.47335178",
"0.47335178",
"0.47181135",
"0.47069415",
"0.47069415",
"0.47069415",
"0.47003484",
"0.46947685",
"0.46841756",
"0.46841756",
"0.46841756",
"0.46817392",
"0.4678343",
"0.46770355",
"0.46767426",
"0.46752223",
"0.46698317",
"0.46661732",
"0.46656257",
"0.4657912",
"0.46546495",
"0.46461144",
"0.46224284",
"0.46104914",
"0.45881376",
"0.4587276",
"0.4583008",
"0.45825297",
"0.4582054",
"0.4578641",
"0.45745772",
"0.4570418",
"0.4570418",
"0.4570418",
"0.456967",
"0.45683166",
"0.45683166",
"0.45683166",
"0.45641622",
"0.45641622",
"0.45641622",
"0.45520413",
"0.45507932",
"0.45463863",
"0.45460576",
"0.45457408",
"0.4544127",
"0.45391434",
"0.45386416",
"0.45386416",
"0.45386416",
"0.453292",
"0.4529059",
"0.451654",
"0.4514843",
"0.4514843",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4509645",
"0.4503893",
"0.45003295",
"0.44988737",
"0.44984478"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public Builder removeOutputs(int index) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.remove(index);
onChanged();
} else {
outputsBuilder_.remove(index);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"private Output() {}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}"
] |
[
"0.58390677",
"0.57641685",
"0.5683741",
"0.5667359",
"0.54360783",
"0.54257494",
"0.54257494",
"0.54257494",
"0.5380848",
"0.5309551",
"0.5229671",
"0.5194976",
"0.5194976",
"0.5194976",
"0.5079201",
"0.50610936",
"0.50610936",
"0.50610936",
"0.4995328",
"0.4995328",
"0.4995328",
"0.49638462",
"0.49606925",
"0.4890485",
"0.48770586",
"0.48426294",
"0.48277754",
"0.48166192",
"0.4807759",
"0.48000687",
"0.47999492",
"0.4775044",
"0.47635818",
"0.47408015",
"0.47361687",
"0.47361687",
"0.47361687",
"0.4716556",
"0.4708647",
"0.4708647",
"0.4708647",
"0.4701263",
"0.46962214",
"0.46858025",
"0.46858025",
"0.46858025",
"0.46798655",
"0.4678699",
"0.46782795",
"0.46773142",
"0.4675359",
"0.46701595",
"0.4667506",
"0.46650067",
"0.4656859",
"0.46550223",
"0.4645945",
"0.4624301",
"0.46093017",
"0.45870286",
"0.45860893",
"0.4583507",
"0.45821878",
"0.45813385",
"0.45791638",
"0.45760104",
"0.45732677",
"0.45732677",
"0.45732677",
"0.45708978",
"0.45708978",
"0.45708978",
"0.45681113",
"0.45668057",
"0.45668057",
"0.45668057",
"0.45527592",
"0.45484787",
"0.4546567",
"0.4545563",
"0.4545312",
"0.45440653",
"0.4540355",
"0.45392814",
"0.45392814",
"0.45392814",
"0.45344558",
"0.45269465",
"0.45167732",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45146802",
"0.45146802",
"0.4509327",
"0.45042706",
"0.45015267",
"0.4499468",
"0.44989544"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder getOutputsBuilder(
int index) {
return getOutputsFieldBuilder().getBuilder(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"private Output() {}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5839294",
"0.5761879",
"0.568135",
"0.5668327",
"0.54366136",
"0.54239696",
"0.54239696",
"0.54239696",
"0.53785956",
"0.53089803",
"0.5230565",
"0.51924884",
"0.51924884",
"0.51924884",
"0.5078679",
"0.50598663",
"0.50598663",
"0.50598663",
"0.4993739",
"0.4993739",
"0.4993739",
"0.49619013",
"0.49583387",
"0.48898363",
"0.4874814",
"0.4842495",
"0.48261663",
"0.48145524",
"0.48063838",
"0.47998536",
"0.4798569",
"0.47727266",
"0.476138",
"0.47393084",
"0.4733455",
"0.4733455",
"0.4733455",
"0.47177455",
"0.47068968",
"0.47068968",
"0.47068968",
"0.4699474",
"0.4693746",
"0.46840978",
"0.46840978",
"0.46840978",
"0.46806166",
"0.46779025",
"0.46768576",
"0.46750754",
"0.46732113",
"0.46691602",
"0.46656036",
"0.46634102",
"0.46569628",
"0.465484",
"0.4646667",
"0.46228305",
"0.4609375",
"0.45865148",
"0.45862263",
"0.45820403",
"0.45813712",
"0.45803708",
"0.4577076",
"0.45746467",
"0.45710364",
"0.45710364",
"0.45710364",
"0.4569009",
"0.45686296",
"0.45686296",
"0.45686296",
"0.4564257",
"0.4564257",
"0.4564257",
"0.45508978",
"0.45498058",
"0.45450208",
"0.45441663",
"0.45441175",
"0.4543071",
"0.45401296",
"0.45398358",
"0.45398358",
"0.45398358",
"0.45323393",
"0.45290437",
"0.45161667",
"0.45140842",
"0.45140842",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45088443",
"0.45013085",
"0.4499925",
"0.44984543",
"0.4498359"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(
int index) {
if (outputsBuilder_ == null) {
return outputs_.get(index); } else {
return outputsBuilder_.getMessageOrBuilder(index);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"private Output() {}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5839294",
"0.5761879",
"0.568135",
"0.5668327",
"0.54366136",
"0.54239696",
"0.54239696",
"0.54239696",
"0.53785956",
"0.53089803",
"0.5230565",
"0.51924884",
"0.51924884",
"0.51924884",
"0.5078679",
"0.50598663",
"0.50598663",
"0.50598663",
"0.4993739",
"0.4993739",
"0.4993739",
"0.49619013",
"0.49583387",
"0.48898363",
"0.4874814",
"0.4842495",
"0.48261663",
"0.48145524",
"0.48063838",
"0.47998536",
"0.4798569",
"0.47727266",
"0.476138",
"0.47393084",
"0.4733455",
"0.4733455",
"0.4733455",
"0.47177455",
"0.47068968",
"0.47068968",
"0.47068968",
"0.4699474",
"0.4693746",
"0.46840978",
"0.46840978",
"0.46840978",
"0.46806166",
"0.46779025",
"0.46768576",
"0.46750754",
"0.46732113",
"0.46691602",
"0.46656036",
"0.46634102",
"0.46569628",
"0.465484",
"0.4646667",
"0.46228305",
"0.4609375",
"0.45865148",
"0.45862263",
"0.45820403",
"0.45813712",
"0.45803708",
"0.4577076",
"0.45746467",
"0.45710364",
"0.45710364",
"0.45710364",
"0.4569009",
"0.45686296",
"0.45686296",
"0.45686296",
"0.45508978",
"0.45498058",
"0.45450208",
"0.45441663",
"0.45441175",
"0.4543071",
"0.45401296",
"0.45398358",
"0.45398358",
"0.45398358",
"0.45323393",
"0.45290437",
"0.45161667",
"0.45140842",
"0.45140842",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45088443",
"0.45013085",
"0.4499925",
"0.44984543",
"0.4498359"
] |
0.4564257
|
75
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder>
getOutputsOrBuilderList() {
if (outputsBuilder_ != null) {
return outputsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outputs_);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"private Output() {}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5838448",
"0.57630724",
"0.56826293",
"0.5669267",
"0.543741",
"0.54236734",
"0.54236734",
"0.54236734",
"0.5379236",
"0.5308372",
"0.5231587",
"0.5192771",
"0.5192771",
"0.5192771",
"0.50789475",
"0.5059578",
"0.5059578",
"0.5059578",
"0.4993983",
"0.4993983",
"0.4993983",
"0.49623787",
"0.4959171",
"0.48892048",
"0.48753598",
"0.48441473",
"0.48280814",
"0.48149517",
"0.48074654",
"0.4801487",
"0.47989202",
"0.4772827",
"0.4762799",
"0.47393438",
"0.47335178",
"0.47335178",
"0.47335178",
"0.47181135",
"0.47069415",
"0.47069415",
"0.47069415",
"0.47003484",
"0.46947685",
"0.46841756",
"0.46841756",
"0.46841756",
"0.46817392",
"0.4678343",
"0.46770355",
"0.46767426",
"0.46752223",
"0.46698317",
"0.46661732",
"0.46656257",
"0.4657912",
"0.46546495",
"0.46461144",
"0.46224284",
"0.46104914",
"0.45881376",
"0.4587276",
"0.4583008",
"0.45825297",
"0.4582054",
"0.4578641",
"0.45745772",
"0.4570418",
"0.4570418",
"0.4570418",
"0.456967",
"0.45683166",
"0.45683166",
"0.45683166",
"0.45641622",
"0.45641622",
"0.45641622",
"0.45520413",
"0.45507932",
"0.45463863",
"0.45460576",
"0.45457408",
"0.4544127",
"0.45391434",
"0.45386416",
"0.45386416",
"0.45386416",
"0.453292",
"0.4529059",
"0.451654",
"0.4514843",
"0.4514843",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4513881",
"0.4509645",
"0.4503893",
"0.45003295",
"0.44988737",
"0.44984478"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {
return getOutputsFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"private Output() {}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}"
] |
[
"0.58390677",
"0.57641685",
"0.5683741",
"0.5667359",
"0.54360783",
"0.54257494",
"0.54257494",
"0.54257494",
"0.5380848",
"0.5309551",
"0.5229671",
"0.5194976",
"0.5194976",
"0.5194976",
"0.5079201",
"0.50610936",
"0.50610936",
"0.50610936",
"0.4995328",
"0.4995328",
"0.4995328",
"0.49638462",
"0.49606925",
"0.4890485",
"0.48770586",
"0.48426294",
"0.48277754",
"0.48166192",
"0.4807759",
"0.48000687",
"0.47999492",
"0.4775044",
"0.47635818",
"0.47408015",
"0.47361687",
"0.47361687",
"0.47361687",
"0.4716556",
"0.4708647",
"0.4708647",
"0.4708647",
"0.4701263",
"0.46962214",
"0.46858025",
"0.46858025",
"0.46858025",
"0.46798655",
"0.4678699",
"0.46782795",
"0.46773142",
"0.4675359",
"0.46701595",
"0.4667506",
"0.46650067",
"0.4656859",
"0.46550223",
"0.4645945",
"0.4624301",
"0.46093017",
"0.45870286",
"0.45860893",
"0.4583507",
"0.45821878",
"0.45813385",
"0.45791638",
"0.45760104",
"0.45732677",
"0.45732677",
"0.45732677",
"0.45708978",
"0.45708978",
"0.45708978",
"0.45681113",
"0.45668057",
"0.45668057",
"0.45668057",
"0.45527592",
"0.45484787",
"0.4546567",
"0.4545563",
"0.4545312",
"0.45440653",
"0.4540355",
"0.45392814",
"0.45392814",
"0.45392814",
"0.45344558",
"0.45269465",
"0.45167732",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45147812",
"0.45146802",
"0.45146802",
"0.4509327",
"0.45042706",
"0.45015267",
"0.4499468",
"0.44989544"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder(
int index) {
return getOutputsFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"private Output() {}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5839294",
"0.5761879",
"0.568135",
"0.5668327",
"0.54366136",
"0.54239696",
"0.54239696",
"0.54239696",
"0.53785956",
"0.53089803",
"0.5230565",
"0.51924884",
"0.51924884",
"0.51924884",
"0.5078679",
"0.50598663",
"0.50598663",
"0.50598663",
"0.4993739",
"0.4993739",
"0.4993739",
"0.49619013",
"0.49583387",
"0.48898363",
"0.4874814",
"0.4842495",
"0.48261663",
"0.48145524",
"0.48063838",
"0.47998536",
"0.4798569",
"0.47727266",
"0.476138",
"0.47393084",
"0.4733455",
"0.4733455",
"0.4733455",
"0.47177455",
"0.47068968",
"0.47068968",
"0.47068968",
"0.4699474",
"0.4693746",
"0.46840978",
"0.46840978",
"0.46840978",
"0.46806166",
"0.46779025",
"0.46768576",
"0.46750754",
"0.46732113",
"0.46691602",
"0.46656036",
"0.46634102",
"0.46569628",
"0.465484",
"0.4646667",
"0.46228305",
"0.4609375",
"0.45865148",
"0.45862263",
"0.45820403",
"0.45813712",
"0.45803708",
"0.4577076",
"0.45746467",
"0.45710364",
"0.45710364",
"0.45710364",
"0.4569009",
"0.45686296",
"0.45686296",
"0.45686296",
"0.4564257",
"0.4564257",
"0.4564257",
"0.45508978",
"0.45498058",
"0.45450208",
"0.45441663",
"0.45441175",
"0.4543071",
"0.45401296",
"0.45398358",
"0.45398358",
"0.45398358",
"0.45323393",
"0.45290437",
"0.45161667",
"0.45140842",
"0.45140842",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45088443",
"0.45013085",
"0.4499925",
"0.44984543",
"0.4498359"
] |
0.0
|
-1
|
An import transaction may contain one or more outputs repeated .PlainOutput outputs = 1;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder>
getOutputsBuilderList() {
return getOutputsFieldBuilder().getBuilderList();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport();",
"org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"public abstract boolean supportsMultipleOutputs();",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"@Test\n\tpublic void testEntitySameInputAndOutput() throws IOException, IOCombinationNotPossibleException {\n\t\tPair<Path, Path> outDirAndFile = copyToTemp(\"/scripts/input4.ttl\");\n\t\tPath inputDir = outDirAndFile.getName();\n\n\t\tnew BPT()\n\t\t\t\t.setInput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.setOutput(inputDir.toAbsolutePath().toString())\n\t\t\t\t.eEntity(\"en\", \"dbpedia\", null);\n\n\t\t// check if output file exists and print to std out\n\t\tPath outFile = outDirAndFile.getValue().resolveSibling(\"out_input4.ttl\");\n\t\tassertTrue(Files.exists(outFile));\n\t\tFiles.copy(outFile, System.out);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"Output getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"boolean stageAfterResultsImport(Object input) throws ValidationFailedException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean hasPlainImport();",
"private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\r\n\t\t\tpublic void flatMap(BlockStructure block, Collector<Tuple2<String, Integer>> output) throws Exception {\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eSource : block.getFromSource()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"S\" + eSource.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (EntityNode eTarget : block.getFromTarget()) {\r\n\t\t\t\t\toutput.collect(new Tuple2<String, Integer>(\"T\" + eTarget.getId(), block.getId()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (plainImportBuilder_ == null) {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n } else {\n if (dataCase_ == 1) {\n return plainImportBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterBCompId compId = new MasterBCompId();\r\n\t\t\t\tcompId.setIdA(1);\r\n\t\t\t\tcompId.setIdB(1);\r\n\t\t\t\tMasterBEnt masterBEnt = (MasterBEnt) ss.get(MasterBEnt.class, compId);\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA());\r\n\t\t\t\tSystem.out.println(\"$$$$: \" + masterBEnt.getDatetimeA().getTime());\r\n\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<MasterBEnt> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEnt);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport getPlainImport() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\n public int writeDataRow(String exportId, int maxRetryCount, int retryTimeout, InputStream inputStream, int noOfChunks, String chunkId, int[] mapcols, int columnCount, String separator)\n throws AnaplanAPIException, SQLException {\n if (jdbcConfig.getJdbcConnectionUrl().length() > MAX_ALLOWED_CONNECTION_STRING_LENGTH) {\n throw new InvalidParameterException(\"JDBC connection string cannot be more than \" + MAX_ALLOWED_CONNECTION_STRING_LENGTH + \" characters in length!\");\n }\n try {\n LineNumberReader lnr = new LineNumberReader(\n new InputStreamReader(inputStream));\n String line;\n List rowBatch = new ArrayList<>();\n while (null != (line = lnr.readLine())) {\n String[] row;\n //ignore the header\n if (lnr.getLineNumber() == 1 && chunkId.equals(\"0\")) {\n LOG.info(\"Export {} to database started successfully\", exportId);\n } else {\n //adding a fix to handle the case when the chunk ends with a complete record\n if (lnr.getLineNumber() == 1 && !(chunkId.equals(\"0\"))) {\n String temp = lastRow.concat(line);\n if (temp.split(separator).length == columnCount) {\n line = temp;\n } else {\n row = lastRow.split(separator);\n rowBatch.add(row);\n }\n }\n row = line.split(separator);\n rowBatch.add(row);\n lastRow = line;\n if (++batch_records % batch_size == 0) {\n ++batch_no;\n //for this batch, code should have dummy values to bypass the check for chunkId and no of chunks\n // chunkId is being sent as 1 and no of chunks as 2 to bypass the check\n batchExecution(rowBatch, columnCount, mapcols, \"1\", 2, maxRetryCount, retryTimeout);\n rowBatch = new ArrayList<>(); //reset temoRowList\n batch_records = 0;\n }\n }\n }\n //Check to make sure it is not the last chunk\n //removing the last record so that it can be processed in the next chunk\n if (Integer.parseInt(chunkId) != noOfChunks - 1 && rowBatch.size() > 0) {\n rowBatch.remove(rowBatch.size() - 1);\n }\n //transfer the last batch when all of the lines from inputstream have been read\n ++batch_no;\n batchExecution(rowBatch, columnCount, mapcols, chunkId, noOfChunks, maxRetryCount, retryTimeout);\n batch_records = 0;\n //batch update exceptions captured to determine the committed and failed records\n } catch (Exception e) {\n LOG.debug(\"Error observed : {}\", e.getStackTrace());\n throw new AnaplanAPIException(e.getMessage());\n } finally {\n if (preparedStatement != null) {\n if (!preparedStatement.isClosed())\n preparedStatement.close();\n }\n }\n return datarowstransferred;\n }",
"public TpImport(){\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterBEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getImportBatchno() {\r\n return importBatchno;\r\n }",
"private Output() {}",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public INTF_Itau_CMX_Import() {\r\n\t\tsuper();\r\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public void setOutput(String output) { this.output = output; }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImportOrBuilder getPlainImportOrBuilder() {\n if (dataCase_ == 1) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainImport) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainImport.getDefaultInstance();\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\tMasterAEnt masterAEnt = (MasterAEnt) ss.get(MasterAEnt.class, 1);\r\n\t\t\t\tList<MasterAEnt> masterAEntList = new ArrayList<>();\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\r\n\t\t\t\tmasterAEntList.add(masterAEnt);\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(true));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<MasterAEnt>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterAEntList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"public void setOutput(LineStroker output) {\n this.output = output;\n }",
"public void setOutputs(ArrayList<Double> outputs)\n {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;",
"protected void setSpecificInputOutput() {\n\t\tsetInputOutput(new GeoElement[] { (GeoElement) point, inputOrtho },\n\t\t\t\tnew GeoElement[] { line });\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"@Override\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<MasterBEnt> masterBEntList = \r\n\t\t\t\t\t\thbSupport.createCriteria(ss, MasterBEnt.class)\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idA\"))\r\n\t\t\t\t\t\t\t.addOrder(OrderCompat.asc(\"compId.idB\")).list();\r\n\t\t\t\tList<Map<String, Map<String, MasterBEnt>>> masterBEntBizarreList = new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\tfor (MasterBEnt masterB : masterBEntList) {\r\n\t\t\t\t\tSignatureBean signBean = ((IPlayerManagerImplementor) PlayerManagerTest.this.manager).generateSignature(masterB);\r\n\t\t\t\t\tString signStr = PlayerManagerTest.this.manager.serializeSignature(signBean);\r\n\t\t\t\t\tMap<String, Map<String, MasterBEnt>> mapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tPlayerSnapshot<MasterBEnt> masterBPS = PlayerManagerTest.this.manager.createPlayerSnapshot(masterB);\r\n\t\t\t\t\tMap<String, MasterBEnt> mapMapItem = new LinkedHashMap<>();\r\n\t\t\t\t\tmapMapItem.put(\"wrappedSnapshot\", masterB);\r\n\t\t\t\t\tmapItem.put(signStr, mapMapItem);\r\n\t\t\t\t\tmasterBEntBizarreList.add(mapItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t.this\r\n\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t.overwriteConfigurationTemporarily(\r\n\t\t\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t\t\t.clone()\r\n\t\t\t\t\t\t\t\t\t\t\t.configSerialiseBySignatureAllRelationship(false));\r\n\t\t\t\t\r\n\t\t\t\tPlayerSnapshot<List<Map<String, Map<String, MasterBEnt>>>> playerSnapshot = PlayerManagerTest.this.manager.createPlayerSnapshot(masterBEntBizarreList);\r\n\t\t\t\t\r\n\t\t\t\tFileOutputStream fos;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfos = new FileOutputStream(generatedFileResult);\r\n\t\t\t\t\tPlayerManagerTest\r\n\t\t\t\t\t\t.this\r\n\t\t\t\t\t\t\t.manager\r\n\t\t\t\t\t\t\t\t.getConfig()\r\n\t\t\t\t\t\t\t\t\t.getObjectMapper()\r\n\t\t\t\t\t\t\t\t\t\t.writerWithDefaultPrettyPrinter()\r\n\t\t\t\t\t\t\t\t\t\t\t.writeValue(fos, playerSnapshot);\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tthrow new RuntimeException(\"Unexpected\", e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test\n public void testMissingFlowsetTemplate() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(10); // sys_uptime\n out.writeInt(20); // unix_secs\n out.writeInt(1); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(12); // length\n\n // Record 1\n out.writeInt(111);\n\n // Record 2\n out.writeInt(222);\n\n List<TSDRLogRecord> records1 = parseRecords(bos.toByteArray());\n assertEquals(0, records1.size());\n\n // Second packet - another data flow set with missing template plus a second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(2); // count\n out.writeInt(20); // sys_uptime\n out.writeInt(30); // unix_secs\n out.writeInt(2); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(256); // flowset_id == missing template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(333);\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(257); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - IN_BYTES\n out.writeShort(4); // field 1 length\n\n List<TSDRLogRecord> records2 = parseRecords(bos.toByteArray());\n assertEquals(0, records2.size());\n assertEquals(0, records1.size());\n\n // Third packet - third template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(35); // sys_uptime\n out.writeInt(45); // unix_secs\n out.writeInt(3); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(258); // template_id\n out.writeShort(1); // field_count\n out.writeShort(1); // field 1 type - PROTOCOL\n out.writeShort(1); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n assertEquals(0, records1.size());\n assertEquals(0, records2.size());\n\n // Fourth packet - data flowset for second template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(40); // sys_uptime\n out.writeInt(50); // unix_secs\n out.writeInt(4); // package_sequence\n out.writeInt(20); // source_id\n\n // Data flow set\n out.writeShort(257); // flowset_id == second template\n out.writeShort(8); // length\n\n // Record\n out.writeInt(999);\n\n List<TSDRLogRecord> records3 = parseRecords(bos.toByteArray());\n assertEquals(1, records3.size());\n\n Map<String, String> attrs = toMap(records3.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(50L * 1000), records3.get(0).getTimeStamp());\n assertEquals(\"40\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"4\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"999\", attrs.remove(\"IN_BYTES\"));\n\n // Fifth packet - missing template\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(5); // sys_uptime\n out.writeInt(5); // unix_secs\n out.writeInt(5); // package_sequence\n out.writeInt(20); // source_id\n\n // Template flow set\n out.writeShort(0); // flowset_id == 0\n out.writeShort(12); // length\n\n // Template\n out.writeShort(256); // template_id\n out.writeShort(1); // field_count\n out.writeShort(2); // field 1 type - IN_PKTS\n out.writeShort(4); // field 1 length\n\n assertEquals(0, parseRecords(bos.toByteArray()).size());\n\n assertEquals(2, records1.size());\n attrs = toMap(records1.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(0).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"111\", attrs.remove(\"IN_PKTS\"));\n\n attrs = toMap(records1.get(1).getRecordAttributes());\n assertEquals(Long.valueOf(20L * 1000), records1.get(1).getTimeStamp());\n assertEquals(\"10\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"1\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"222\", attrs.remove(\"IN_PKTS\"));\n\n assertEquals(1, records2.size());\n attrs = toMap(records2.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(30L * 1000), records2.get(0).getTimeStamp());\n assertEquals(\"20\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"2\", attrs.remove(\"package_sequence\"));\n assertEquals(\"20\", attrs.remove(\"source_id\"));\n assertEquals(\"333\", attrs.remove(\"IN_PKTS\"));\n }"
] |
[
"0.5839294",
"0.5761879",
"0.568135",
"0.5668327",
"0.54366136",
"0.54239696",
"0.54239696",
"0.54239696",
"0.53785956",
"0.53089803",
"0.5230565",
"0.51924884",
"0.51924884",
"0.51924884",
"0.5078679",
"0.50598663",
"0.50598663",
"0.50598663",
"0.4993739",
"0.4993739",
"0.4993739",
"0.49619013",
"0.49583387",
"0.48898363",
"0.4874814",
"0.4842495",
"0.48261663",
"0.48145524",
"0.48063838",
"0.47998536",
"0.4798569",
"0.47727266",
"0.476138",
"0.47393084",
"0.4733455",
"0.4733455",
"0.4733455",
"0.47177455",
"0.47068968",
"0.47068968",
"0.47068968",
"0.4699474",
"0.4693746",
"0.46840978",
"0.46840978",
"0.46840978",
"0.46806166",
"0.46779025",
"0.46768576",
"0.46750754",
"0.46732113",
"0.46691602",
"0.46656036",
"0.46634102",
"0.46569628",
"0.465484",
"0.4646667",
"0.46228305",
"0.4609375",
"0.45865148",
"0.45862263",
"0.45820403",
"0.45813712",
"0.45803708",
"0.4577076",
"0.45746467",
"0.45710364",
"0.45710364",
"0.45710364",
"0.4569009",
"0.45686296",
"0.45686296",
"0.45686296",
"0.4564257",
"0.4564257",
"0.4564257",
"0.45508978",
"0.45498058",
"0.45450208",
"0.45441663",
"0.45441175",
"0.4543071",
"0.45401296",
"0.45398358",
"0.45398358",
"0.45398358",
"0.45323393",
"0.45290437",
"0.45161667",
"0.45140842",
"0.45140842",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45130652",
"0.45088443",
"0.45013085",
"0.4499925",
"0.44984543",
"0.4498359"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId>
getInputsList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.5657541
|
15
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.6384342
|
2
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
int getInputsCount();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder>
getInputsOrBuilderList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.5354408
|
31
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(
int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.600467
|
6
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput>
getOutputsList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.5891314",
"0.5891314",
"0.5891314",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5530391",
"0.5530391",
"0.5530391",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.53885865",
"0.53885865",
"0.53885865",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.5298093",
"0.5298093",
"0.5298093",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.5618365
|
23
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.61798984
|
3
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
int getOutputsCount();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.50662845
|
74
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder>
getOutputsOrBuilderList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.57173425
|
16
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(
int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5618365",
"0.5618365",
"0.5618365",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5530391",
"0.5530391",
"0.5530391",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.53885865",
"0.53885865",
"0.53885865",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.5298093",
"0.5298093",
"0.5298093",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.5891314
|
12
|
Use PlainTransfer.newBuilder() to construct.
|
private PlainTransfer(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private PlainTransferFrom(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransferFromOrBuilder getPlainTransferFromOrBuilder();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.Builder getPlainTransferFromBuilder() {\n return getPlainTransferFromFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom getPlainTransferFrom();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder getPlainTransferOrBuilder();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder getPlainTransferBuilder() {\n return getPlainTransferFieldBuilder().getBuilder();\n }",
"public Builder setPlainTransfer(org.hyperledger.fabric.protos.token.Transaction.PlainTransfer value) {\n if (plainTransferBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainTransferBuilder_.setMessage(value);\n }\n dataCase_ = 2;\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"public Builder clearPlainTransfer() {\n if (plainTransferBuilder_ == null) {\n if (dataCase_ == 2) {\n dataCase_ = 0;\n data_ = null;\n onChanged();\n }\n } else {\n if (dataCase_ == 2) {\n dataCase_ = 0;\n data_ = null;\n }\n plainTransferBuilder_.clear();\n }\n return this;\n }",
"private NetTransferMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder clearPlainTransferFrom() {\n if (plainTransferFromBuilder_ == null) {\n if (dataCase_ == 5) {\n dataCase_ = 0;\n data_ = null;\n onChanged();\n }\n } else {\n if (dataCase_ == 5) {\n dataCase_ = 0;\n data_ = null;\n }\n plainTransferFromBuilder_.clear();\n }\n return this;\n }",
"public Builder setPlainTransferFrom(org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom value) {\n if (plainTransferFromBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainTransferFromBuilder_.setMessage(value);\n }\n dataCase_ = 5;\n return this;\n }",
"public EntityTypeTransfer() {\n this(null, null, null, null, null, null, null, null);\n }",
"private NetTransferMsgs(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder getPlainTransferOrBuilder() {\n if ((dataCase_ == 2) && (plainTransferBuilder_ != null)) {\n return plainTransferBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 2) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n }\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainTransfer, org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder> \n getPlainTransferFieldBuilder() {\n if (plainTransferBuilder_ == null) {\n if (!(dataCase_ == 2)) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n }\n plainTransferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainTransfer, org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder>(\n (org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_,\n getParentForChildren(),\n isClean());\n data_ = null;\n }\n dataCase_ = 2;\n onChanged();;\n return plainTransferBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder getPlainTransferOrBuilder() {\n if (dataCase_ == 2) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferFromOrBuilder getPlainTransferFromOrBuilder() {\n if ((dataCase_ == 5) && (plainTransferFromBuilder_ != null)) {\n return plainTransferFromBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 5) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferFromOrBuilder getPlainTransferFromOrBuilder() {\n if (dataCase_ == 5) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer() {\n if (plainTransferBuilder_ == null) {\n if (dataCase_ == 2) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n } else {\n if (dataCase_ == 2) {\n return plainTransferBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n }\n }",
"public Builder mergePlainTransfer(org.hyperledger.fabric.protos.token.Transaction.PlainTransfer value) {\n if (plainTransferBuilder_ == null) {\n if (dataCase_ == 2 &&\n data_ != org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance()) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.newBuilder((org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_)\n .mergeFrom(value).buildPartial();\n } else {\n data_ = value;\n }\n onChanged();\n } else {\n if (dataCase_ == 2) {\n plainTransferBuilder_.mergeFrom(value);\n }\n plainTransferBuilder_.setMessage(value);\n }\n dataCase_ = 2;\n return this;\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom, org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainTransferFromOrBuilder> \n getPlainTransferFromFieldBuilder() {\n if (plainTransferFromBuilder_ == null) {\n if (!(dataCase_ == 5)) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance();\n }\n plainTransferFromBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom, org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainTransferFromOrBuilder>(\n (org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom) data_,\n getParentForChildren(),\n isClean());\n data_ = null;\n }\n dataCase_ = 5;\n onChanged();;\n return plainTransferFromBuilder_;\n }",
"public TransferConfigurationTransferAllDetails() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom getPlainTransferFrom() {\n if (plainTransferFromBuilder_ == null) {\n if (dataCase_ == 5) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance();\n } else {\n if (dataCase_ == 5) {\n return plainTransferFromBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer() {\n if (dataCase_ == 2) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom getPlainTransferFrom() {\n if (dataCase_ == 5) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance();\n }",
"public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }",
"public Builder mergePlainTransferFrom(org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom value) {\n if (plainTransferFromBuilder_ == null) {\n if (dataCase_ == 5 &&\n data_ != org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.getDefaultInstance()) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.newBuilder((org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom) data_)\n .mergeFrom(value).buildPartial();\n } else {\n data_ = value;\n }\n onChanged();\n } else {\n if (dataCase_ == 5) {\n plainTransferFromBuilder_.mergeFrom(value);\n }\n plainTransferFromBuilder_.setMessage(value);\n }\n dataCase_ = 5;\n return this;\n }",
"private PlainImport(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder clearTransferTxt() {\n \n transferTxt_ = getDefaultInstance().getTransferTxt();\n onChanged();\n return this;\n }",
"public DefaultDigitalTransferOptions() {\n }",
"public Builder setPlainTransferFrom(\n org.hyperledger.fabric.protos.token.Transaction.PlainTransferFrom.Builder builderForValue) {\n if (plainTransferFromBuilder_ == null) {\n data_ = builderForValue.build();\n onChanged();\n } else {\n plainTransferFromBuilder_.setMessage(builderForValue.build());\n }\n dataCase_ = 5;\n return this;\n }",
"private PlainOutput(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setPlainTransfer(\n org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder builderForValue) {\n if (plainTransferBuilder_ == null) {\n data_ = builderForValue.build();\n onChanged();\n } else {\n plainTransferBuilder_.setMessage(builderForValue.build());\n }\n dataCase_ = 2;\n return this;\n }",
"public MoneyTransfer() {\n }",
"public static Builder newBuilder(TransferSerialMessage other) {\n return new Builder(other);\n }",
"public DefaultTransferCoding() {\n super(TransferCoding.DEFAULT);\n }",
"@SdkPublicApi\npublic interface ObjectTransfer extends Transfer {\n /**\n * The stateful {@link TransferProgress} associated with this transfer.\n */\n TransferProgress progress();\n}",
"private Builder() {\n super(TransferSerialMessage.SCHEMA$);\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder getPlainRedeemOrBuilder();",
"public Transfer() {\n initComponents();\n }",
"public BlockTransferNode()\r\n/* 45: */ {\r\n/* 46: 44 */ super(0);\r\n/* 47: 45 */ setBlockName(\"extrautils:extractor_base\");\r\n/* 48: 46 */ setBlockTextureName(\"extrautils:extractor_base\");\r\n/* 49: 47 */ setCreativeTab(ExtraUtils.creativeTabExtraUtils);\r\n/* 50: 48 */ setHardness(0.5F);\r\n/* 51: 49 */ setStepSound(soundTypeStone);\r\n/* 52: */ }",
"private Builder(TransferSerialMessage other) {\n super(TransferSerialMessage.SCHEMA$);\n if (isValidValue(fields()[0], other.accountID)) {\n this.accountID = data().deepCopy(fields()[0].schema(), other.accountID);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.createDate)) {\n this.createDate = data().deepCopy(fields()[2].schema(), other.createDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.TransferSerials)) {\n this.TransferSerials = data().deepCopy(fields()[3].schema(), other.TransferSerials);\n fieldSetFlags()[3] = true;\n }\n }",
"public Builder clearTransferId() {\n fieldSetFlags()[0] = false;\n return this;\n }",
"public DataXferRaw() throws Exception {\n\t\tsuper(\"dataxferraw\", true);\n\t}",
"public TransferMarket() {\n }",
"private PlainDelegatedOutput(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public BasicDriveTeleOp() {\n\n }",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public static TransferStub newStub(io.grpc.Channel channel) {\n return new TransferStub(channel);\n }",
"private StorageMessageWrapper(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setTransferTxtBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n transferTxt_ = value;\n onChanged();\n return this;\n }",
"private UGoDeliver(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private UploadRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setPlainRedeem(org.hyperledger.fabric.protos.token.Transaction.PlainTransfer value) {\n if (plainRedeemBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainRedeemBuilder_.setMessage(value);\n }\n dataCase_ = 3;\n return this;\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"private Trade(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Payment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private TaskProtocol(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static com.trg.fms.api.Trip.Builder newBuilder() {\n return new com.trg.fms.api.Trip.Builder();\n }",
"boolean hasPlainTransfer();",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainRedeem();",
"private UDeliveryMade(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private TransmissionMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder clearNetTransferMsgs() {\n if (netTransferMsgsBuilder_ == null) {\n netTransferMsgs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n netTransferMsgsBuilder_.clear();\n }\n return this;\n }",
"default TorrentDto from(final TrackedTorrent t) {\n if (null == t) {\n return null;\n }\n return new TorrentDto(t.getHexInfoHash(),\n PeerMapper.I.to(Lists.newArrayList(t.getPeers().values())));\n }",
"private transitFlight(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainTransfer, org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder> \n getPlainRedeemFieldBuilder() {\n if (plainRedeemBuilder_ == null) {\n if (!(dataCase_ == 3)) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance();\n }\n plainRedeemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainTransfer, org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainTransferOrBuilder>(\n (org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_,\n getParentForChildren(),\n isClean());\n data_ = null;\n }\n dataCase_ = 3;\n onChanged();;\n return plainRedeemBuilder_;\n }",
"public Builder mergePlainRedeem(org.hyperledger.fabric.protos.token.Transaction.PlainTransfer value) {\n if (plainRedeemBuilder_ == null) {\n if (dataCase_ == 3 &&\n data_ != org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.getDefaultInstance()) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.newBuilder((org.hyperledger.fabric.protos.token.Transaction.PlainTransfer) data_)\n .mergeFrom(value).buildPartial();\n } else {\n data_ = value;\n }\n onChanged();\n } else {\n if (dataCase_ == 3) {\n plainRedeemBuilder_.mergeFrom(value);\n }\n plainRedeemBuilder_.setMessage(value);\n }\n dataCase_ = 3;\n return this;\n }",
"private TradeMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private TransformedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"MessageClasses<I, M> createCopyForNewSuperstep();",
"public BaseContract() {}",
"private CreateRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Basis(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private DownloadRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Triplet(Builder builder) {\n super(builder);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainTransfer.Builder getPlainRedeemBuilder() {\n return getPlainRedeemFieldBuilder().getBuilder();\n }",
"private CreateTaskPack(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"boolean hasPlainTransferFrom();",
"public Builder clearTransferSerials() {\n TransferSerials = null;\n fieldSetFlags()[3] = false;\n return this;\n }",
"private Message(MessageType handle) {\n this(handle, null, null);\n }",
"private UGoPickup(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Generic(){\n\t\tthis(null);\n\t}",
"private Transaction(Engine destination) {\n super(new ToggleQueue(INITIAL_CAPACITY), destination,\n destination.broker);\n this.id = Long.toString(Time.now());\n }",
"private ConverseRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private PasskeyContract() {}",
"private Bytes(final long bytes)\n\t{\n\t\tsuper(bytes);\n\n\t\tif (bytes < 0)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"'bytes' cannot be negative: \" + bytes);\n\t\t}\n\t}",
"public InfoTransferService(String name) {\n super(name);\n }",
"IUnit copy();",
"public boolean hasPlainTransfer() {\n return dataCase_ == 2;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainImport.Builder getPlainImportBuilder() {\n return getPlainImportFieldBuilder().getBuilder();\n }",
"private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Layer(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"ITransport createTransport(T netconfAccessInfo) throws NetconfException;",
"public boolean hasPlainTransfer() {\n return dataCase_ == 2;\n }",
"private TradeMsgRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] |
[
"0.77109903",
"0.7004354",
"0.6883582",
"0.6799942",
"0.6691695",
"0.6666476",
"0.6663702",
"0.6580376",
"0.64195335",
"0.63742167",
"0.63502854",
"0.6307314",
"0.6168076",
"0.6115486",
"0.59650356",
"0.5942826",
"0.5916821",
"0.5873639",
"0.5869922",
"0.58147895",
"0.5805334",
"0.57667583",
"0.57429504",
"0.5712009",
"0.5643198",
"0.55696297",
"0.5533591",
"0.55126166",
"0.54905844",
"0.5478259",
"0.5449441",
"0.5423584",
"0.5408542",
"0.5394044",
"0.53878707",
"0.5386386",
"0.5384914",
"0.5348565",
"0.53323597",
"0.5329376",
"0.52401596",
"0.5232857",
"0.52189404",
"0.5215989",
"0.5214602",
"0.51504827",
"0.5143883",
"0.511785",
"0.51092046",
"0.50151634",
"0.5005592",
"0.497977",
"0.4961341",
"0.49312255",
"0.4918435",
"0.4914184",
"0.48963133",
"0.48746946",
"0.48689762",
"0.484986",
"0.48266175",
"0.48242185",
"0.48151103",
"0.4810464",
"0.4809065",
"0.4803021",
"0.4799607",
"0.47878733",
"0.47866145",
"0.47648925",
"0.47349802",
"0.47323892",
"0.4720648",
"0.47194126",
"0.47177476",
"0.47123903",
"0.47052664",
"0.4704517",
"0.4703075",
"0.46936768",
"0.46902984",
"0.46819067",
"0.46773204",
"0.46747383",
"0.4671387",
"0.46669126",
"0.46624509",
"0.46595153",
"0.46554035",
"0.46505347",
"0.46386644",
"0.4636635",
"0.4635877",
"0.46314836",
"0.4628665",
"0.46270162",
"0.46237743",
"0.4621306",
"0.46183512",
"0.4614698"
] |
0.8005813
|
0
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {
return inputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.5359305
|
30
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder>
getInputsOrBuilderList() {
return inputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.5406362
|
24
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public int getInputsCount() {
return inputs_.size();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {
return inputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.5686599
|
10
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(
int index) {
return inputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.56615967
|
13
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {
return outputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.5208598
|
60
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder>
getOutputsOrBuilderList() {
return outputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.5891314",
"0.5891314",
"0.5891314",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5618365",
"0.5618365",
"0.5618365",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5530391",
"0.5530391",
"0.5530391",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.5298093",
"0.5298093",
"0.5298093",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.53885865
|
43
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public int getOutputsCount() {
return outputs_.size();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566"
] |
0.49777016
|
99
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {
return outputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.5370302
|
45
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(
int index) {
return outputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.560815
|
26
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {
if (inputsBuilder_ == null) {
return java.util.Collections.unmodifiableList(inputs_);
} else {
return inputsBuilder_.getMessageList();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.48500824
|
78
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public int getInputsCount() {
if (inputsBuilder_ == null) {
return inputs_.size();
} else {
return inputsBuilder_.getCount();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {
if (inputsBuilder_ == null) {
return inputs_.get(index);
} else {
return inputsBuilder_.getMessage(index);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.56564087
|
18
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder setInputs(
int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {
if (inputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputsIsMutable();
inputs_.set(index, value);
onChanged();
} else {
inputsBuilder_.setMessage(index, value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.49832097
|
57
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder setInputs(
int index, org.hyperledger.fabric.protos.token.Transaction.InputId.Builder builderForValue) {
if (inputsBuilder_ == null) {
ensureInputsIsMutable();
inputs_.set(index, builderForValue.build());
onChanged();
} else {
inputsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {
if (inputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputsIsMutable();
inputs_.add(value);
onChanged();
} else {
inputsBuilder_.addMessage(value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.4796266
|
91
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder addInputs(
int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {
if (inputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputsIsMutable();
inputs_.add(index, value);
onChanged();
} else {
inputsBuilder_.addMessage(index, value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder addInputs(
org.hyperledger.fabric.protos.token.Transaction.InputId.Builder builderForValue) {
if (inputsBuilder_ == null) {
ensureInputsIsMutable();
inputs_.add(builderForValue.build());
onChanged();
} else {
inputsBuilder_.addMessage(builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder addInputs(
int index, org.hyperledger.fabric.protos.token.Transaction.InputId.Builder builderForValue) {
if (inputsBuilder_ == null) {
ensureInputsIsMutable();
inputs_.add(index, builderForValue.build());
onChanged();
} else {
inputsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder addAllInputs(
java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.InputId> values) {
if (inputsBuilder_ == null) {
ensureInputsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, inputs_);
onChanged();
} else {
inputsBuilder_.addAllMessages(values);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder clearInputs() {
if (inputsBuilder_ == null) {
inputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
inputsBuilder_.clear();
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder removeInputs(int index) {
if (inputsBuilder_ == null) {
ensureInputsIsMutable();
inputs_.remove(index);
onChanged();
} else {
inputsBuilder_.remove(index);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder getInputsBuilder(
int index) {
return getInputsFieldBuilder().getBuilder(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(
int index) {
if (inputsBuilder_ == null) {
return inputs_.get(index); } else {
return inputsBuilder_.getMessageOrBuilder(index);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.54596907
|
21
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder>
getInputsOrBuilderList() {
if (inputsBuilder_ != null) {
return inputsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(inputs_);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.49815387
|
62
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {
return getInputsFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.50145113
|
52
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder(
int index) {
return getInputsFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId.Builder>
getInputsBuilderList() {
return getInputsFieldBuilder().getBuilderList();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {
if (outputsBuilder_ == null) {
return java.util.Collections.unmodifiableList(outputs_);
} else {
return outputsBuilder_.getMessageList();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.5033278
|
88
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public int getOutputsCount() {
if (outputsBuilder_ == null) {
return outputs_.size();
} else {
return outputsBuilder_.getCount();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {
if (outputsBuilder_ == null) {
return outputs_.get(index);
} else {
return outputsBuilder_.getMessage(index);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.5891314",
"0.5891314",
"0.5891314",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5618365",
"0.5618365",
"0.5618365",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.53885865",
"0.53885865",
"0.53885865",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.5298093",
"0.5298093",
"0.5298093",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.5530391
|
34
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder setOutputs(
int index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.set(index, value);
onChanged();
} else {
outputsBuilder_.setMessage(index, value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder setOutputs(
int index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.set(index, builderForValue.build());
onChanged();
} else {
outputsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder addOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.add(value);
onChanged();
} else {
outputsBuilder_.addMessage(value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder addOutputs(
int index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.add(index, value);
onChanged();
} else {
outputsBuilder_.addMessage(index, value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.5891314",
"0.5891314",
"0.5891314",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5618365",
"0.5618365",
"0.5618365",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5530391",
"0.5530391",
"0.5530391",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.53885865",
"0.53885865",
"0.53885865",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.5298093",
"0.5298093",
"0.5298093",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder addOutputs(
org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.add(builderForValue.build());
onChanged();
} else {
outputsBuilder_.addMessage(builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder addOutputs(
int index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.add(index, builderForValue.build());
onChanged();
} else {
outputsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder addAllOutputs(
java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutput> values) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outputs_);
onChanged();
} else {
outputsBuilder_.addAllMessages(values);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder clearOutputs() {
if (outputsBuilder_ == null) {
outputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
outputsBuilder_.clear();
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.5891314",
"0.5891314",
"0.5891314",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5618365",
"0.5618365",
"0.5618365",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5530391",
"0.5530391",
"0.5530391",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.53885865",
"0.53885865",
"0.53885865",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.5298093",
"0.5298093",
"0.5298093",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public Builder removeOutputs(int index) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.remove(index);
onChanged();
} else {
outputsBuilder_.remove(index);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder getOutputsBuilder(
int index) {
return getOutputsFieldBuilder().getBuilder(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(
int index) {
if (outputsBuilder_ == null) {
return outputs_.get(index); } else {
return outputsBuilder_.getMessageOrBuilder(index);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.55442345
|
31
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder>
getOutputsOrBuilderList() {
if (outputsBuilder_ != null) {
return outputsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outputs_);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528075",
"0.63628167",
"0.61807436",
"0.61807436",
"0.61807436",
"0.61306006",
"0.61151004",
"0.60722333",
"0.5977465",
"0.5916867",
"0.5891314",
"0.5891314",
"0.5891314",
"0.58867884",
"0.5828518",
"0.57414293",
"0.57169116",
"0.57169116",
"0.57169116",
"0.56647235",
"0.56377465",
"0.5618365",
"0.5618365",
"0.5618365",
"0.5607084",
"0.5607084",
"0.5607084",
"0.56009895",
"0.5561931",
"0.5549679",
"0.5542982",
"0.5542982",
"0.5542982",
"0.5530391",
"0.5530391",
"0.5530391",
"0.5523094",
"0.5491542",
"0.5490083",
"0.54861546",
"0.5426551",
"0.53885865",
"0.53885865",
"0.53885865",
"0.5376938",
"0.5370544",
"0.5370544",
"0.5370544",
"0.53561896",
"0.5346301",
"0.527778",
"0.5238077",
"0.52221686",
"0.52212733",
"0.5211903",
"0.52073145",
"0.52073145",
"0.52073145",
"0.52069944",
"0.51729137",
"0.5156642",
"0.51367354",
"0.51234275",
"0.51231766",
"0.51111144",
"0.5100827",
"0.50965655",
"0.5081989",
"0.5071228",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.5065952",
"0.50559026",
"0.5052925",
"0.5052371",
"0.5049447",
"0.5049117",
"0.5047118",
"0.50437164",
"0.5042268",
"0.50410384",
"0.5040488",
"0.5033683",
"0.5033683",
"0.5033683",
"0.5020974",
"0.5010793",
"0.5010487",
"0.49989623",
"0.49957263",
"0.49955285",
"0.49887082",
"0.49821088",
"0.49774542",
"0.49774542",
"0.49774542"
] |
0.5298093
|
51
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {
return getOutputsFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder(
int index) {
return getOutputsFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"@Override\n public void emitOutput() {\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"OutputsType getOutputs();",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"public void onOutputReceived(MoneroOutputWallet output);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.65272444",
"0.6361832",
"0.61798984",
"0.61798984",
"0.61798984",
"0.6129998",
"0.6113905",
"0.60716563",
"0.59768903",
"0.5916258",
"0.5890475",
"0.5890475",
"0.5890475",
"0.58866334",
"0.582753",
"0.5742232",
"0.5715987",
"0.5715987",
"0.5715987",
"0.56661284",
"0.5637539",
"0.5617438",
"0.5617438",
"0.5617438",
"0.5606611",
"0.5606611",
"0.5606611",
"0.5600845",
"0.5561079",
"0.55490804",
"0.554264",
"0.554264",
"0.554264",
"0.5530255",
"0.5530255",
"0.5530255",
"0.5524012",
"0.54891527",
"0.54880446",
"0.5484194",
"0.5426271",
"0.53880537",
"0.53880537",
"0.53880537",
"0.53764445",
"0.5370302",
"0.5370302",
"0.5370302",
"0.53540224",
"0.5346299",
"0.5297659",
"0.5297659",
"0.5297659",
"0.5277262",
"0.5238378",
"0.52222335",
"0.52221453",
"0.5211867",
"0.52073455",
"0.5207011",
"0.5207011",
"0.5207011",
"0.51729935",
"0.51552236",
"0.513472",
"0.5124142",
"0.5124126",
"0.5110228",
"0.5100349",
"0.5096954",
"0.5082644",
"0.5070345",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50662845",
"0.50549585",
"0.5052428",
"0.50523496",
"0.5051048",
"0.50483316",
"0.5047457",
"0.5043676",
"0.5041383",
"0.5039739",
"0.5038699",
"0.5033278",
"0.5033278",
"0.5033278",
"0.50209653",
"0.5010295",
"0.5009734",
"0.49988925",
"0.4997626",
"0.49969327",
"0.4988896",
"0.49818566",
"0.49777016",
"0.49777016",
"0.49777016"
] |
0.0
|
-1
|
A transfer transaction may contain one or more outputs repeated .PlainOutput outputs = 2;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder>
getOutputsBuilderList() {
return getOutputsFieldBuilder().getBuilderList();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testOutputsInUTXOPool() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is NOT put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // UTXO pool does not contains the UTXO\n assertFalse(txHandler.isValidTx(tx1));\n\n // Put output of createCoinTx to the pool\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler1 = new TxHandler(utxoPool);\n\n // UTXO pool now contains the UTXO\n assertTrue(txHandler1.isValidTx(tx1));\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public abstract boolean supportsMultipleOutputs();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private boolean areOutputsSpent(Transaction tx){\n // Need to see if tx inputs are contained in the blockchain UTXOs\n for(TransactionInput i : tx.inputs){\n if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){\n return true;\n }\n }\n return false;\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"@Test\n public void testSupertypeOutputTypes() throws Exception {\n // InterfaceContract source = new MockContract(\"FooContract\");\n // DataType sourceOutputType = new DataTypeImpl<Type>(Object.class,\n // Object.class);\n // Operation opSource1 = newOperationImpl(\"op1\", null,\n // sourceOutputType, null, false, null);\n // Map<String, Operation> sourceOperations = new HashMap<String,\n // Operation>();\n // sourceOperations.put(\"op1\", opSource1);\n // source.getInterface().getOperations().addAll(sourceOperations.values());\n //\n // InterfaceContract target = new MockContract(\"FooContract\");\n // DataType targetOutputType = new DataTypeImpl<Type>(String.class,\n // String.class);\n // Operation opTarget = newOperationImpl(\"op1\", null, targetOutputType,\n // null, false, null);\n // Map<String, Operation> targetOperations = new HashMap<String,\n // Operation>();\n // targetOperations.put(\"op1\", opTarget);\n // target.getInterface().getOperations().addAll(targetOperations.values());\n // wireService.checkCompatibility(source, target, false);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n return outputs_.get(index);\n }",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"com.google.protobuf.ByteString\n getOutputBytes();",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public static void validateTransactionOutput(TransactionOutput out, BlockHeader header, NetworkParams params)\n throws ValidationException\n {\n\n if (header.getBlockHeight() < params.getActivationHeightTxOutRequirements())\n {\n if (out.getRequirements().getRequiredBlockHeight() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n if (out.getRequirements().getRequiredTime() != 0)\n {\n throw new ValidationException(\"TxOut requirements not enabled yet\");\n }\n }\n else\n {\n if (out.getRequirements().getRequiredBlockHeight() < 0)\n {\n throw new ValidationException(\"TxOut required block height must not be negative\");\n }\n if (out.getRequirements().getRequiredTime() < 0)\n {\n throw new ValidationException(\"TxOut required time must not be negative\");\n }\n }\n if (header.getBlockHeight() < params.getActivationHeightTxOutExtras())\n {\n \n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n throw new ValidationException(\"TxOut extras not enabled yet\");\n }\n TransactionOutput test_out = TransactionOutput.newBuilder()\n .setRecipientSpecHash(out.getRecipientSpecHash())\n .setValue(out.getValue())\n .build();\n if (!test_out.toByteString().equals(out.toByteString()))\n {\n throw new ValidationException(\"TxOut extras not enabled yet, extra data found\");\n }\n }\n if (out.getForBenefitOfSpecHash().size() > 0)\n {\n validateAddressSpecHash(out.getForBenefitOfSpecHash(), \"TxOut for_benefit_of_spec_hash\");\n }\n\n\n }",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"@Override\n public void emitOutput() {\n }",
"OutputsType getOutputs();",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"Output getOutputs();",
"@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Column(name = \"OUTPUT\", length = 1000)\n/* */ @Order(3)\n/* 76 */ public String getOutput() { return this.output; }",
"public void onOutputReceived(MoneroOutputWallet output);",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"protected void writeData(DataOutput output) throws IOException {\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bout);\n oos.writeObject(returnValue);\n\n output.write(getOperationStatus());\n \n if (operationStatus != ProtocolOpcode.OPERATION_OK) {\n output.write(getException());\n } else {\n output.writeInt(bout.size());\n output.write(bout.toByteArray());\n }\n }",
"int getDelegatedOutputsCount();",
"@Override\n\tpublic void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) {\n\t}",
"@Test\n public void TxHandlerTestFirst() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test some basic functions of TxHandler\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n // tx0: Scrooge --> Scrooge 25coins [Create Coins]\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx( pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n\n // tx1: Scrooge --> Scrooge 4coins [Divide Coins]\n //\t Scrooge --> Scrooge 5coins\n //\t Scrooge --> Scrooge 6coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(),0);\n\n tx1.addOutput(4,pkScrooge.getPublic());\n tx1.addOutput(5,pkScrooge.getPublic());\n tx1.addOutput(6,pkScrooge.getPublic());\n\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n\n assertTrue(\"tx1:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx2: Scrooge --> Alice 4coins [Pay separately]\n //\t Scrooge --> Alice 5coins\n // Scrooge --> Bob 6coins\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addInput(tx1.getHash(), 1);\n tx2.addInput(tx1.getHash(), 2);\n\n tx2.addOutput(4, pkAlice.getPublic());\n tx2.addOutput(5, pkAlice.getPublic());\n tx2.addOutput(6, pkBob.getPublic());\n\n tx2.signTx(pkScrooge.getPrivate(), 0);\n tx2.signTx(pkScrooge.getPrivate(), 1);\n tx2.signTx(pkScrooge.getPrivate(), 2);\n\n txHandler = new TxHandler(utxoPool);\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:Three UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n\n // tx3:Alice --> Alice 2coins [Divide Coins]\n // Alice --> Alice 2coins\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(),0);\n\n tx3.addOutput(2, pkAlice.getPublic());\n tx3.addOutput(2, pkAlice.getPublic());\n\n tx3.signTx(pkAlice.getPrivate(),0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 4);\n\n // tx4: Alice --> Bob 2coins [Pay jointly]\n // Alice --> Bob 5coins\n Transaction tx4 = new Transaction();\n tx4.addInput(tx3.getHash(),0);\n tx4.addInput(tx2.getHash(),1);\n\n tx4.addOutput(7, pkBob.getPublic());\n\n tx4.signTx(pkAlice.getPrivate(), 0);\n tx4.signTx(pkAlice.getPrivate(),1);\n\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx4) returns: \" + txHandler.isValidTx(tx4));\n assertTrue(\"tx4:One valid transaction\", txHandler.handleTxs(new Transaction[]{tx4}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx4:Two UTXO's are created\", utxoPool.getAllUTXO().size() == 3);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n// System.out.println(\"tx4.hashCode returns: \" + tx4.hashCode());\n }",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"@java.lang.Override\n public com.dogecoin.protocols.payments.Protos.Output getOutputs(int index) {\n return outputs_.get(index);\n }",
"public boolean transfer(double total, String sender, String receiver) {\n\n }",
"@java.lang.Override\n public boolean hasOutputParams() {\n return ((bitField0_ & 0x00000008) != 0);\n }",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"public com.dogecoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"void generateSameTX(String name, List<String> types, Settings settings);",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n if (outputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(outputs_);\n } else {\n return outputsBuilder_.getMessageList();\n }\n }",
"public FreeStandingTransactionOutput(NetworkParameters params, UTXO output, int chainHeight) {\n super(params, null, output.getValue(), output.getScript().getProgram());\n this.output = output;\n this.chainHeight = chainHeight;\n }",
"public List<ContractIOType> getOutputs() {\n return outputs;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"private Output initChainOutput(Output finalOutput) {\n\n if (chain.length == 0) {\n return finalOutput;\n } else {\n return newStage(finalOutput, chain.length - 1);\n }\n }",
"@Override\n\tpublic void connectOutputWire(Wire connectingWire, String outputName) {\n\t\t\n\t}",
"@Override final protected Class<?>[] getOutputTypes() { return this.OutputTypes; }",
"org.hyperledger.fabric.protos.token.Transaction.PlainTransfer getPlainTransfer();",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }",
"public int getOutputsCount() {\n return outputs_.size();\n }"
] |
[
"0.6528843",
"0.63633084",
"0.6181453",
"0.6181453",
"0.6181453",
"0.613044",
"0.611521",
"0.60722846",
"0.59777963",
"0.5917513",
"0.5892145",
"0.5892145",
"0.5892145",
"0.588707",
"0.5828713",
"0.5741581",
"0.57173425",
"0.57173425",
"0.57173425",
"0.56661165",
"0.563853",
"0.5618996",
"0.5618996",
"0.5618996",
"0.560815",
"0.560815",
"0.560815",
"0.56014854",
"0.5562146",
"0.5550401",
"0.55442345",
"0.55442345",
"0.55442345",
"0.5531808",
"0.5531808",
"0.5531808",
"0.55245537",
"0.5491241",
"0.5489371",
"0.5485836",
"0.5427176",
"0.5389674",
"0.5389674",
"0.5389674",
"0.53758895",
"0.53716725",
"0.53716725",
"0.53716725",
"0.5355362",
"0.53475773",
"0.52992433",
"0.52992433",
"0.52992433",
"0.52771115",
"0.52394253",
"0.52235436",
"0.5222387",
"0.52129436",
"0.5208598",
"0.5208598",
"0.5208598",
"0.5207671",
"0.51741123",
"0.51563716",
"0.5134953",
"0.5124338",
"0.5124202",
"0.5110382",
"0.51010495",
"0.5097157",
"0.5082798",
"0.5071327",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.50667745",
"0.5056306",
"0.5054039",
"0.5052239",
"0.5049422",
"0.5049319",
"0.5048852",
"0.5044635",
"0.5043117",
"0.5039684",
"0.5039229",
"0.5035015",
"0.5035015",
"0.5035015",
"0.50218564",
"0.5011159",
"0.5010909",
"0.4999174",
"0.49967334",
"0.499641",
"0.49883986",
"0.49825177",
"0.49789134",
"0.49789134",
"0.49789134"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId>
getInputsList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.5657256
|
16
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.63837165
|
1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
int getInputsCount();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder>
getInputsOrBuilderList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.5355124
|
33
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(
int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.60049874
|
4
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput>
getDelegatedOutputsList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810038",
"0.6629777",
"0.6238801",
"0.6164657",
"0.60224277",
"0.5971631",
"0.5914245",
"0.5892375",
"0.5874306",
"0.58488804",
"0.5841512",
"0.582411",
"0.5810432",
"0.58058316",
"0.5774716",
"0.575164",
"0.5623772",
"0.5567059",
"0.55439883",
"0.5516545",
"0.5506967",
"0.5487345",
"0.5424322",
"0.5408481",
"0.5379821",
"0.53395766",
"0.53190064",
"0.5244892",
"0.5199916",
"0.512763",
"0.51184136",
"0.51123464",
"0.51123464",
"0.51123464",
"0.5099493",
"0.5099493",
"0.5099493",
"0.5069081",
"0.50246644",
"0.5022794",
"0.50007355",
"0.49942732",
"0.49604416",
"0.49155504",
"0.49155504",
"0.49155504",
"0.49145615",
"0.48879603",
"0.48786497",
"0.48652127",
"0.48406288",
"0.48406288",
"0.48406288",
"0.4766698",
"0.4766698",
"0.4766698",
"0.47417954",
"0.47417954",
"0.47417954",
"0.47387183",
"0.47387183",
"0.47387183",
"0.47322088",
"0.4716459",
"0.46793035",
"0.4675995",
"0.46604714",
"0.46574828",
"0.46552297",
"0.4652713",
"0.4652713",
"0.4652713",
"0.46510527",
"0.46372354",
"0.46299455",
"0.46241254",
"0.46041635",
"0.46017632",
"0.46017632",
"0.46017632",
"0.45861238",
"0.45814008",
"0.45725107",
"0.45415488",
"0.45378754",
"0.45378754",
"0.45378754",
"0.45130745",
"0.4509503",
"0.4509503",
"0.45081475",
"0.45053682",
"0.45053148",
"0.44961858",
"0.4486127",
"0.44833606",
"0.44714507",
"0.44714507",
"0.44714507",
"0.44708645"
] |
0.5933379
|
6
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810038",
"0.6629777",
"0.6164657",
"0.60224277",
"0.5971631",
"0.5933379",
"0.5914245",
"0.5892375",
"0.5874306",
"0.58488804",
"0.5841512",
"0.582411",
"0.5810432",
"0.58058316",
"0.5774716",
"0.575164",
"0.5623772",
"0.5567059",
"0.55439883",
"0.5516545",
"0.5506967",
"0.5487345",
"0.5424322",
"0.5408481",
"0.5379821",
"0.53395766",
"0.53190064",
"0.5244892",
"0.5199916",
"0.512763",
"0.51184136",
"0.51123464",
"0.51123464",
"0.51123464",
"0.5099493",
"0.5099493",
"0.5099493",
"0.5069081",
"0.50246644",
"0.5022794",
"0.50007355",
"0.49942732",
"0.49604416",
"0.49155504",
"0.49155504",
"0.49155504",
"0.49145615",
"0.48879603",
"0.48786497",
"0.48652127",
"0.48406288",
"0.48406288",
"0.48406288",
"0.4766698",
"0.4766698",
"0.4766698",
"0.47417954",
"0.47417954",
"0.47417954",
"0.47387183",
"0.47387183",
"0.47387183",
"0.47322088",
"0.4716459",
"0.46793035",
"0.4675995",
"0.46604714",
"0.46574828",
"0.46552297",
"0.4652713",
"0.4652713",
"0.4652713",
"0.46510527",
"0.46372354",
"0.46299455",
"0.46241254",
"0.46041635",
"0.46017632",
"0.46017632",
"0.46017632",
"0.45861238",
"0.45814008",
"0.45725107",
"0.45415488",
"0.45378754",
"0.45378754",
"0.45378754",
"0.45130745",
"0.4509503",
"0.4509503",
"0.45081475",
"0.45053682",
"0.45053148",
"0.44961858",
"0.4486127",
"0.44833606",
"0.44714507",
"0.44714507",
"0.44714507",
"0.44708645"
] |
0.6238801
|
2
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
int getDelegatedOutputsCount();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810723",
"0.663033",
"0.6239002",
"0.61649907",
"0.6023484",
"0.59732807",
"0.59349096",
"0.59152174",
"0.5893069",
"0.5875147",
"0.585068",
"0.58427185",
"0.5825095",
"0.58109254",
"0.5807792",
"0.5775515",
"0.57527643",
"0.562435",
"0.556856",
"0.5544129",
"0.551485",
"0.5508642",
"0.54887277",
"0.5425073",
"0.540994",
"0.53812236",
"0.53406304",
"0.5246159",
"0.5198464",
"0.51295495",
"0.51200753",
"0.511249",
"0.511249",
"0.511249",
"0.50996006",
"0.50996006",
"0.50996006",
"0.5070361",
"0.5025559",
"0.5024416",
"0.5001941",
"0.49931648",
"0.49620268",
"0.49165162",
"0.49165162",
"0.49165162",
"0.49135458",
"0.48873204",
"0.48795903",
"0.48660126",
"0.4841015",
"0.4841015",
"0.4841015",
"0.47676232",
"0.47676232",
"0.47676232",
"0.4743882",
"0.4743882",
"0.4743882",
"0.47401008",
"0.47401008",
"0.47401008",
"0.4731655",
"0.4716137",
"0.46792915",
"0.46775723",
"0.4658639",
"0.4658314",
"0.4657267",
"0.465286",
"0.465286",
"0.465286",
"0.4648436",
"0.46381873",
"0.4629865",
"0.46250972",
"0.46029666",
"0.46029666",
"0.46029666",
"0.46025229",
"0.45851484",
"0.4584073",
"0.45704553",
"0.45415875",
"0.4538899",
"0.4538899",
"0.4538899",
"0.45140615",
"0.4510431",
"0.4510431",
"0.4508737",
"0.45065948",
"0.45063406",
"0.44955102",
"0.44845608",
"0.44819924",
"0.44716975",
"0.44716975",
"0.44716975",
"0.44707522"
] |
0.5319898
|
27
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>
getDelegatedOutputsOrBuilderList();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }"
] |
[
"0.6811925",
"0.66320944",
"0.6239035",
"0.61646163",
"0.6022585",
"0.5972006",
"0.59336436",
"0.5916377",
"0.58924127",
"0.5877075",
"0.5849665",
"0.5826749",
"0.5810729",
"0.58076257",
"0.5774995",
"0.5753915",
"0.56252986",
"0.55663455",
"0.5544947",
"0.5516319",
"0.5509012",
"0.5487342",
"0.5426634",
"0.5408882",
"0.53806275",
"0.5340447",
"0.53176206",
"0.5246001",
"0.51993936",
"0.51282716",
"0.51208323",
"0.5111216",
"0.5111216",
"0.5111216",
"0.50977045",
"0.50977045",
"0.50977045",
"0.5068381",
"0.5026949",
"0.5023344",
"0.5001428",
"0.4994233",
"0.4961339",
"0.49163628",
"0.49137306",
"0.49137306",
"0.49137306",
"0.4887088",
"0.48786744",
"0.48671758",
"0.48388132",
"0.48388132",
"0.48388132",
"0.47651175",
"0.47651175",
"0.47651175",
"0.4742248",
"0.4742248",
"0.4742248",
"0.47372976",
"0.47372976",
"0.47372976",
"0.4732805",
"0.47159594",
"0.4680566",
"0.46731007",
"0.4660316",
"0.46585292",
"0.4655745",
"0.46509713",
"0.46509713",
"0.46509713",
"0.46487817",
"0.4638493",
"0.46294755",
"0.4624831",
"0.46036878",
"0.46008673",
"0.46008673",
"0.46008673",
"0.458685",
"0.4582057",
"0.45708779",
"0.45425072",
"0.45363072",
"0.45363072",
"0.45363072",
"0.45136884",
"0.45102423",
"0.4509745",
"0.4509745",
"0.45072234",
"0.4506",
"0.44966692",
"0.4484575",
"0.44821417",
"0.4471641",
"0.44701064",
"0.44701064",
"0.44701064"
] |
0.5841364
|
11
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(
int index);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810038",
"0.6629777",
"0.6238801",
"0.60224277",
"0.5971631",
"0.5933379",
"0.5914245",
"0.5892375",
"0.5874306",
"0.58488804",
"0.5841512",
"0.582411",
"0.5810432",
"0.58058316",
"0.5774716",
"0.575164",
"0.5623772",
"0.5567059",
"0.55439883",
"0.5516545",
"0.5506967",
"0.5487345",
"0.5424322",
"0.5408481",
"0.5379821",
"0.53395766",
"0.53190064",
"0.5244892",
"0.5199916",
"0.512763",
"0.51184136",
"0.51123464",
"0.51123464",
"0.51123464",
"0.5099493",
"0.5099493",
"0.5099493",
"0.5069081",
"0.50246644",
"0.5022794",
"0.50007355",
"0.49942732",
"0.49604416",
"0.49155504",
"0.49155504",
"0.49155504",
"0.49145615",
"0.48879603",
"0.48786497",
"0.48652127",
"0.48406288",
"0.48406288",
"0.48406288",
"0.4766698",
"0.4766698",
"0.4766698",
"0.47417954",
"0.47417954",
"0.47417954",
"0.47387183",
"0.47387183",
"0.47387183",
"0.47322088",
"0.4716459",
"0.46793035",
"0.4675995",
"0.46604714",
"0.46574828",
"0.46552297",
"0.4652713",
"0.4652713",
"0.4652713",
"0.46510527",
"0.46372354",
"0.46299455",
"0.46241254",
"0.46041635",
"0.46017632",
"0.46017632",
"0.46017632",
"0.45861238",
"0.45814008",
"0.45725107",
"0.45415488",
"0.45378754",
"0.45378754",
"0.45378754",
"0.45130745",
"0.4509503",
"0.4509503",
"0.45081475",
"0.45053682",
"0.45053148",
"0.44961858",
"0.4486127",
"0.44833606",
"0.44714507",
"0.44714507",
"0.44714507",
"0.44708645"
] |
0.6164657
|
3
|
An approve transaction contains one plain output .PlainOutput output = 3;
|
boolean hasOutput();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void other_statements_ok(Transaction t) {\n System.out.println(\"about to verify\");\n verify_transaction(t);\n System.out.println(\"verified\");\n make_transaction(t);\n System.out.println(\"success!\");\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"boolean hasPlainApprove();",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"void confirmTrans(ITransaction trans);",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void authorizeTransaction() {}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }",
"String showPreparedTransactions();",
"@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}",
"@Override\n\tpublic AutheConfirmPayOutput confirmPay(AutheConfirmPayInput input) {\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"TransactionResponseType createTransactionResponseType();",
"void setTransactionSuccessful();",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n\tpublic String doSth(String xml) {\n\t\tPraseXML praseXML = new PraseXML(xml);\n\t\tMap<String, String> map = praseXML.getInMessageMap();\n\t\tString loanNo=map.get(\"LOAN_NO\");\n\t\t\n\t\tString ddNo=map.get(\"DD_NO\");\n\t\t//System.out.println(loanNo+\"哈哈\"+ddNo);\n\t\tString client=\" \";\n\t\tString lender=\" \";\n\t\tString loanManager=\" \";\n\t\tString loanType=\" \";\n\t\tString loanSubType=\" \";\n\t\tString acctExec=\" \";\n\t\tString ccy=\" \";\n\t\tint ddAmt=0;\n\t\tdouble intRate=0;\n\t\tint loanAmt=0;\n\t\tint drawnAmt=0;\n\t\tString acctNo=\" \";\n\t\tConnection conn = ConnectionPool.getOneConn();\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tcs = conn.prepareCall(\"{call SP_GET_PAY_INFO(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\tcs.setString(1,loanNo);\n\t\t\tcs.setString(2,ddNo);\n\t\t\tcs.registerOutParameter(3,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(4,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(5,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(6,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(7,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(8,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(9,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(10,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(11,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(12,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(13,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(14,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.execute();\n\t\t\tclient=cs.getString(3);\n\t\t\tlender=cs.getString(4);\n\t\t\tloanManager=\" \";\n\t\t\tloanType=cs.getString(6);\n\t\t\tloanSubType=cs.getString(7);\n\t\t\tacctExec=\" \";\n\t\t\tccy=cs.getString(9);\n\t\t\tddAmt=cs.getInt(10);\n\t\t\tintRate=cs.getDouble(11);\n\t\t\tloanAmt=cs.getInt(12);\n\t\t\tdrawnAmt=cs.getInt(13);\n\t\t\tacctNo=cs.getString(14);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tpraseXML.setBodyMessage(\"CLIENT\",client);\n\t\t\n\t\t//praseXML.setBodyMessage(\"LENDER\",lender);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_MANAGER\", loanManager);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_TYPE\", loanType);\n\t\n\t\tpraseXML.setBodyMessage(\"LOAN_SUB_TYPE\", loanSubType);\n\t\n\t\tpraseXML.setBodyMessage(\"ACCT_EXEC\", acctExec);\n\t\t\n\t\tpraseXML.setBodyMessage(\"CCY\", ccy);\n\t\t\n\t\tpraseXML.setBodyMessage(\"DD_AMT\", ddAmt+\"\");\n\t\t\n\t\tpraseXML.setBodyMessage(\"INT_RATE\", intRate+\"\");\n\t\tpraseXML.setBodyMessage(\"LOAN_AMT\", loanAmt+\"\");\n\t\tpraseXML.setBodyMessage(\"DRAWN_AMT\", drawnAmt+\"\");\n\t\n\t\treturn praseXML.getRootXml();\n\t}",
"BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"@Override\n\tpublic void doFunction(String[] zInput) throws Exception {\n\t\tMessage msg = getResponseMessage(ConsensusTxn.CONSENSUS_TXNSCRIPT);\n\t\tmsg.addInteger(\"transaction\", Integer.parseInt(zInput[1]));\n\t\tmsg.addString(\"script\", zInput[2]);\n\t\tmsg.addString(\"proof\", zInput[3]);\n\t\t\t\t\n\t\tgetMainHandler().getConsensusHandler().PostMessage(msg);\n\t}",
"public ReversionResponse() {\n\t\tthis.codigoBusqueda = \"\";\n\t\tthis.idTxnNeivorResponse = 0L;\n\t\tthis.idTxnRevertida = 0L;\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public String approveMarriageNotice() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"approving marriage notice idUKey : \" + idUKey + \" and notice type : \" + noticeType +\n \" and with ignore warnings : \" + ignoreWarnings);\n }\n //todo remove\n //follow use to display serial number in action message ans action errors\n marriage = marriageRegistrationService.getByIdUKey(idUKey, user);\n String[] actionMassageArray = new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : Long.toString(marriage.getSerialOfMaleNotice())};\n try {\n warnings = marriageRegistrationService.\n approveMarriageNotice(idUKey, noticeType, ignoreWarnings, user);\n if (warnings.size() > 0) {\n //if warning size is more than 0 we forward in to approval warning page\n warningsAtApproval = true;\n return \"warning\";\n }\n addActionMessage(getText(\"message.approve.success\", actionMassageArray));\n logger.debug(\"successfully approved marriage notice idUKey : {} and notice type :{ }\", idUKey, noticeType);\n } catch (CRSRuntimeException e) {\n //error happens when approving marriage notice\n switch (e.getErrorCode()) {\n case ErrorCodes.OTHER_PARTY_MUST_APPROVE_FIRST:\n addActionError(getText(\"error.other.party.approve.first\",\n new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n (marriage.getSerialOfMaleNotice() != null) ?\n Long.toString(marriage.getSerialOfMaleNotice()) : getText(\"message.not.yet.add\") :\n (marriage.getSerialOfFemaleNotice() != null) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : getText(\"message.not.yet.add\")}));\n break;\n case ErrorCodes.UNABLE_APPROVE_MARRIAGE_NOTICE_PROHIBITED_RELATIONSHIP:\n addActionError(getText(\"error.approval.failed\", actionMassageArray) + \" , \" + e.getMessage());\n break;\n case ErrorCodes.BRIDES_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.brides.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.GROOMS_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.grooms.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.MORE_THAN_ONE_ACTIVE_LICENSE:\n addActionError(getText(\"error.unable.to.approve.already.issued.license\"));\n break;\n default:\n addActionError(getText(\"error.approval.failed\", actionMassageArray));\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId,\n dsDivisionId, mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return \"failed\";\n } catch (Exception e) {\n logger.debug(\"exception while approving marriage notice :idUKey \");\n return ERROR;\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId, dsDivisionId,\n mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return SUCCESS;\n }",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@OnClick(R.id.mApprovalCommit)\n void onApprovalPress() {\n String userName = mPetitionConcertUserName.getText().toString();\n// if (!userName.equals(\"\")) {\n// userName = userName.substring(1, userName.length() - 1);\n// }\n// String content = mPetitionContent.getText().toString();\n// String petitioner = mPetitioner.getText().toString();\n// String timeRange = mPetitionTimeRange.getText().toString();\n String result = mApprovalResultMenuTab.getText().toString();\n String opinion = mApprovalOpinion.getText().toString();\n if (opinion.equals(\"\")) {\n Toast.makeText(this, \"请输入审批意见\", Toast.LENGTH_SHORT).show();\n } else {\n if (mDialog == null) mDialog = new ProgressDialog(this);\n mDialog.setMessage(\"正在提交,请稍后...\");\n mDialog.setCancelable(false);\n mDialog.show();\n switch (result) {\n case \"同意\":\n mPresent.approvalAgree(approval.getRequestid(), approval.getApproveNodeId(), approval.getApprovePerson(), opinion);\n break;\n case \"不同意\":\n mPresent.approvalRefused(approval.getRequestid(), approval.getApprovePerson(), opinion);\n break;\n default:\n Log.e(TAG, \"onApprovalPress: \" + approval.getRequestid() + \"::\" + approval.getApproveNodeId() + \"::\" + approval.getApprovePerson() + \"::\" + opinion);\n break;\n }\n }\n\n\n }",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"public IBankTransfert payment();",
"@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n transaction.setAction(TransactionAction.VOID);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionVoidRequest(\n transaction.getFundingSource(),\n transaction.getProcessorResponse().getRetrievalRefNum());\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n Log.d(TAG, elavonResponse != null ? elavonResponse.toString() : \"n/a\");\n if (elavonResponse.isSuccess()) {\n Log.i(TAG, \"voidTransaction: \" + transaction.getId() + \" SUCCESS\");\n if (listener != null) {\n convergeMapper.mapTransactionResponse(elavonResponse, transaction);\n try {\n // update the transactionId w/ new void txn Id and set parent\n transaction.setParentId(transaction.getId());\n transaction.setId(UUID.randomUUID());\n listener.onResponse(transaction, requestId, null);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n } else {\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n try {\n // TODO need better error mapping\n PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n t.printStackTrace();\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n // TODO need better error mapping\n final PoyntError error = new PoyntError(PoyntError.CHECK_CARD_FAILURE);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {\n\t\tthis.reciepient = reciepient;\n\t\tthis.msg = msg;\n\t\tthis.parentTransactionId = parentTransactionId;\n\t\tthis.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);\n\t}",
"boolean hasTxnresponse();",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public Action<PaymentState, PaymentEvent> getOverrideCode(){\n\n return ctx -> {\n log.info(\"<<< Override Code service has been called >>>\");\n if(new Random().nextInt(10) < 8){\n log.info(\"Override auth request Approved\");\n log.info(\"<<< Setting event to BAL_OK which should move the state to MAKE_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_OK).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n } else {\n log.info(\"Override auth request Rejected\");\n log.info(\"<<< Setting event to BAL_KO which should move the state to DENY_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_KO).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n }\n\n };\n }",
"@Override\r\n\tpublic ApiResult execute(ApiPayload payload) {\n\t\tlogger.info(\"============>I Publish A Advertisement, Id Is {}\", payload.getAdvertisementId());\r\n\t\treturn new ApiResult(0, \"msg\", \"{ data }\");\r\n\t}",
"public String execute() {\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"void confirmRealWorldTrade(IUserAccount user, ITransaction trans);",
"public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}",
"public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"public String crearActualizarArancel() {\n\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }",
"public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\ttry {\n\t\t\t//1、先创建Session\n\t\t\tSession session=HibernateUtils.getSession();\n\t\t\tsession.beginTransaction();\n\t\t\t//2、执行action\n\t\t\tString result=invocation.invoke();\t//一旦执行到这一句就会打印出sql语句\n\t\t\t\n\t\t\t//4、提交事物\n\t\t\tsession.getTransaction().commit();\t//不需要关闭session\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error\";\n\t\t}\n\t}",
"public Builder setOutput(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {\n if (outputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n output_ = value;\n onChanged();\n } else {\n outputBuilder_.setMessage(value);\n }\n\n return this;\n }"
] |
[
"0.69035065",
"0.67681974",
"0.6326005",
"0.6100993",
"0.59218",
"0.5918723",
"0.5887832",
"0.5747326",
"0.5702259",
"0.5686563",
"0.56655806",
"0.5607208",
"0.5589014",
"0.55882293",
"0.5584644",
"0.5544868",
"0.5522761",
"0.5497064",
"0.5489985",
"0.5489556",
"0.5488435",
"0.5486329",
"0.54668057",
"0.5435078",
"0.54348403",
"0.5434483",
"0.5426877",
"0.53673166",
"0.536554",
"0.53550684",
"0.53531784",
"0.53065515",
"0.5294754",
"0.52703774",
"0.5245972",
"0.5231797",
"0.52249044",
"0.5224083",
"0.5219865",
"0.5199937",
"0.5195459",
"0.5188493",
"0.51878965",
"0.51698554",
"0.51638967",
"0.5146024",
"0.5127947",
"0.51149684",
"0.51009905",
"0.50868076",
"0.5067921",
"0.50670743",
"0.5065551",
"0.5061288",
"0.5054531",
"0.5035179",
"0.5034696",
"0.503408",
"0.50330794",
"0.503289",
"0.5030934",
"0.5023909",
"0.5020103",
"0.5017427",
"0.5016834",
"0.50132525",
"0.5007529",
"0.49996272",
"0.49937418",
"0.49898052",
"0.4988375",
"0.49846375",
"0.4984028",
"0.49829113",
"0.49758002",
"0.4975393",
"0.49751133",
"0.4968153",
"0.49646065",
"0.49547267",
"0.4953416",
"0.49518037",
"0.49513382",
"0.49414185",
"0.49412546",
"0.49364263",
"0.49341035",
"0.49336392",
"0.49321315",
"0.49309468",
"0.4930023",
"0.49194",
"0.4919026",
"0.49185833",
"0.49155095",
"0.49118617",
"0.4904842",
"0.4902143",
"0.4901887",
"0.4901525",
"0.49005213"
] |
0.0
|
-1
|
An approve transaction contains one plain output .PlainOutput output = 3;
|
org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void other_statements_ok(Transaction t) {\n System.out.println(\"about to verify\");\n verify_transaction(t);\n System.out.println(\"verified\");\n make_transaction(t);\n System.out.println(\"success!\");\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"boolean hasPlainApprove();",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"void confirmTrans(ITransaction trans);",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void authorizeTransaction() {}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }",
"String showPreparedTransactions();",
"@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}",
"@Override\n\tpublic AutheConfirmPayOutput confirmPay(AutheConfirmPayInput input) {\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"TransactionResponseType createTransactionResponseType();",
"void setTransactionSuccessful();",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n\tpublic String doSth(String xml) {\n\t\tPraseXML praseXML = new PraseXML(xml);\n\t\tMap<String, String> map = praseXML.getInMessageMap();\n\t\tString loanNo=map.get(\"LOAN_NO\");\n\t\t\n\t\tString ddNo=map.get(\"DD_NO\");\n\t\t//System.out.println(loanNo+\"哈哈\"+ddNo);\n\t\tString client=\" \";\n\t\tString lender=\" \";\n\t\tString loanManager=\" \";\n\t\tString loanType=\" \";\n\t\tString loanSubType=\" \";\n\t\tString acctExec=\" \";\n\t\tString ccy=\" \";\n\t\tint ddAmt=0;\n\t\tdouble intRate=0;\n\t\tint loanAmt=0;\n\t\tint drawnAmt=0;\n\t\tString acctNo=\" \";\n\t\tConnection conn = ConnectionPool.getOneConn();\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tcs = conn.prepareCall(\"{call SP_GET_PAY_INFO(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\tcs.setString(1,loanNo);\n\t\t\tcs.setString(2,ddNo);\n\t\t\tcs.registerOutParameter(3,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(4,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(5,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(6,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(7,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(8,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(9,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(10,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(11,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(12,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(13,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(14,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.execute();\n\t\t\tclient=cs.getString(3);\n\t\t\tlender=cs.getString(4);\n\t\t\tloanManager=\" \";\n\t\t\tloanType=cs.getString(6);\n\t\t\tloanSubType=cs.getString(7);\n\t\t\tacctExec=\" \";\n\t\t\tccy=cs.getString(9);\n\t\t\tddAmt=cs.getInt(10);\n\t\t\tintRate=cs.getDouble(11);\n\t\t\tloanAmt=cs.getInt(12);\n\t\t\tdrawnAmt=cs.getInt(13);\n\t\t\tacctNo=cs.getString(14);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tpraseXML.setBodyMessage(\"CLIENT\",client);\n\t\t\n\t\t//praseXML.setBodyMessage(\"LENDER\",lender);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_MANAGER\", loanManager);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_TYPE\", loanType);\n\t\n\t\tpraseXML.setBodyMessage(\"LOAN_SUB_TYPE\", loanSubType);\n\t\n\t\tpraseXML.setBodyMessage(\"ACCT_EXEC\", acctExec);\n\t\t\n\t\tpraseXML.setBodyMessage(\"CCY\", ccy);\n\t\t\n\t\tpraseXML.setBodyMessage(\"DD_AMT\", ddAmt+\"\");\n\t\t\n\t\tpraseXML.setBodyMessage(\"INT_RATE\", intRate+\"\");\n\t\tpraseXML.setBodyMessage(\"LOAN_AMT\", loanAmt+\"\");\n\t\tpraseXML.setBodyMessage(\"DRAWN_AMT\", drawnAmt+\"\");\n\t\n\t\treturn praseXML.getRootXml();\n\t}",
"BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"@Override\n\tpublic void doFunction(String[] zInput) throws Exception {\n\t\tMessage msg = getResponseMessage(ConsensusTxn.CONSENSUS_TXNSCRIPT);\n\t\tmsg.addInteger(\"transaction\", Integer.parseInt(zInput[1]));\n\t\tmsg.addString(\"script\", zInput[2]);\n\t\tmsg.addString(\"proof\", zInput[3]);\n\t\t\t\t\n\t\tgetMainHandler().getConsensusHandler().PostMessage(msg);\n\t}",
"public ReversionResponse() {\n\t\tthis.codigoBusqueda = \"\";\n\t\tthis.idTxnNeivorResponse = 0L;\n\t\tthis.idTxnRevertida = 0L;\n\t}",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public String approveMarriageNotice() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"approving marriage notice idUKey : \" + idUKey + \" and notice type : \" + noticeType +\n \" and with ignore warnings : \" + ignoreWarnings);\n }\n //todo remove\n //follow use to display serial number in action message ans action errors\n marriage = marriageRegistrationService.getByIdUKey(idUKey, user);\n String[] actionMassageArray = new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : Long.toString(marriage.getSerialOfMaleNotice())};\n try {\n warnings = marriageRegistrationService.\n approveMarriageNotice(idUKey, noticeType, ignoreWarnings, user);\n if (warnings.size() > 0) {\n //if warning size is more than 0 we forward in to approval warning page\n warningsAtApproval = true;\n return \"warning\";\n }\n addActionMessage(getText(\"message.approve.success\", actionMassageArray));\n logger.debug(\"successfully approved marriage notice idUKey : {} and notice type :{ }\", idUKey, noticeType);\n } catch (CRSRuntimeException e) {\n //error happens when approving marriage notice\n switch (e.getErrorCode()) {\n case ErrorCodes.OTHER_PARTY_MUST_APPROVE_FIRST:\n addActionError(getText(\"error.other.party.approve.first\",\n new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n (marriage.getSerialOfMaleNotice() != null) ?\n Long.toString(marriage.getSerialOfMaleNotice()) : getText(\"message.not.yet.add\") :\n (marriage.getSerialOfFemaleNotice() != null) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : getText(\"message.not.yet.add\")}));\n break;\n case ErrorCodes.UNABLE_APPROVE_MARRIAGE_NOTICE_PROHIBITED_RELATIONSHIP:\n addActionError(getText(\"error.approval.failed\", actionMassageArray) + \" , \" + e.getMessage());\n break;\n case ErrorCodes.BRIDES_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.brides.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.GROOMS_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.grooms.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.MORE_THAN_ONE_ACTIVE_LICENSE:\n addActionError(getText(\"error.unable.to.approve.already.issued.license\"));\n break;\n default:\n addActionError(getText(\"error.approval.failed\", actionMassageArray));\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId,\n dsDivisionId, mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return \"failed\";\n } catch (Exception e) {\n logger.debug(\"exception while approving marriage notice :idUKey \");\n return ERROR;\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId, dsDivisionId,\n mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return SUCCESS;\n }",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@OnClick(R.id.mApprovalCommit)\n void onApprovalPress() {\n String userName = mPetitionConcertUserName.getText().toString();\n// if (!userName.equals(\"\")) {\n// userName = userName.substring(1, userName.length() - 1);\n// }\n// String content = mPetitionContent.getText().toString();\n// String petitioner = mPetitioner.getText().toString();\n// String timeRange = mPetitionTimeRange.getText().toString();\n String result = mApprovalResultMenuTab.getText().toString();\n String opinion = mApprovalOpinion.getText().toString();\n if (opinion.equals(\"\")) {\n Toast.makeText(this, \"请输入审批意见\", Toast.LENGTH_SHORT).show();\n } else {\n if (mDialog == null) mDialog = new ProgressDialog(this);\n mDialog.setMessage(\"正在提交,请稍后...\");\n mDialog.setCancelable(false);\n mDialog.show();\n switch (result) {\n case \"同意\":\n mPresent.approvalAgree(approval.getRequestid(), approval.getApproveNodeId(), approval.getApprovePerson(), opinion);\n break;\n case \"不同意\":\n mPresent.approvalRefused(approval.getRequestid(), approval.getApprovePerson(), opinion);\n break;\n default:\n Log.e(TAG, \"onApprovalPress: \" + approval.getRequestid() + \"::\" + approval.getApproveNodeId() + \"::\" + approval.getApprovePerson() + \"::\" + opinion);\n break;\n }\n }\n\n\n }",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"public IBankTransfert payment();",
"@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n transaction.setAction(TransactionAction.VOID);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionVoidRequest(\n transaction.getFundingSource(),\n transaction.getProcessorResponse().getRetrievalRefNum());\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n Log.d(TAG, elavonResponse != null ? elavonResponse.toString() : \"n/a\");\n if (elavonResponse.isSuccess()) {\n Log.i(TAG, \"voidTransaction: \" + transaction.getId() + \" SUCCESS\");\n if (listener != null) {\n convergeMapper.mapTransactionResponse(elavonResponse, transaction);\n try {\n // update the transactionId w/ new void txn Id and set parent\n transaction.setParentId(transaction.getId());\n transaction.setId(UUID.randomUUID());\n listener.onResponse(transaction, requestId, null);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n } else {\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n try {\n // TODO need better error mapping\n PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n t.printStackTrace();\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n // TODO need better error mapping\n final PoyntError error = new PoyntError(PoyntError.CHECK_CARD_FAILURE);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {\n\t\tthis.reciepient = reciepient;\n\t\tthis.msg = msg;\n\t\tthis.parentTransactionId = parentTransactionId;\n\t\tthis.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);\n\t}",
"boolean hasTxnresponse();",
"public void onOutputSpent(MoneroOutputWallet output);",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public Action<PaymentState, PaymentEvent> getOverrideCode(){\n\n return ctx -> {\n log.info(\"<<< Override Code service has been called >>>\");\n if(new Random().nextInt(10) < 8){\n log.info(\"Override auth request Approved\");\n log.info(\"<<< Setting event to BAL_OK which should move the state to MAKE_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_OK).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n } else {\n log.info(\"Override auth request Rejected\");\n log.info(\"<<< Setting event to BAL_KO which should move the state to DENY_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_KO).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n }\n\n };\n }",
"@Override\r\n\tpublic ApiResult execute(ApiPayload payload) {\n\t\tlogger.info(\"============>I Publish A Advertisement, Id Is {}\", payload.getAdvertisementId());\r\n\t\treturn new ApiResult(0, \"msg\", \"{ data }\");\r\n\t}",
"public String execute() {\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }",
"void confirmRealWorldTrade(IUserAccount user, ITransaction trans);",
"public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"public String crearActualizarArancel() {\n\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }",
"public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public Builder setOutput(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {\n if (outputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n output_ = value;\n onChanged();\n } else {\n outputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\ttry {\n\t\t\t//1、先创建Session\n\t\t\tSession session=HibernateUtils.getSession();\n\t\t\tsession.beginTransaction();\n\t\t\t//2、执行action\n\t\t\tString result=invocation.invoke();\t//一旦执行到这一句就会打印出sql语句\n\t\t\t\n\t\t\t//4、提交事物\n\t\t\tsession.getTransaction().commit();\t//不需要关闭session\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error\";\n\t\t}\n\t}",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }"
] |
[
"0.6767624",
"0.6327885",
"0.6100693",
"0.5921483",
"0.5918227",
"0.5887025",
"0.5746899",
"0.5701653",
"0.5686136",
"0.5666455",
"0.5606286",
"0.5589443",
"0.5587578",
"0.5584172",
"0.5544209",
"0.55223566",
"0.54958326",
"0.5488989",
"0.5488883",
"0.54881525",
"0.5485796",
"0.54684186",
"0.5435172",
"0.5434537",
"0.5433543",
"0.5427806",
"0.53681237",
"0.536629",
"0.5355845",
"0.53527963",
"0.53054506",
"0.52938455",
"0.52713436",
"0.5246383",
"0.5231166",
"0.52235925",
"0.52234715",
"0.52206516",
"0.5201063",
"0.5195468",
"0.5187476",
"0.5186917",
"0.51711863",
"0.51630825",
"0.51454556",
"0.5127593",
"0.51142",
"0.5102298",
"0.50865066",
"0.5066897",
"0.50660753",
"0.5065888",
"0.50622493",
"0.5054619",
"0.5035765",
"0.503359",
"0.50334543",
"0.50328183",
"0.50317043",
"0.50300795",
"0.50232935",
"0.50197965",
"0.50169355",
"0.5016197",
"0.50132287",
"0.5007193",
"0.49994823",
"0.49937984",
"0.498953",
"0.49894795",
"0.49858087",
"0.49834046",
"0.49819428",
"0.4975124",
"0.49747014",
"0.49744132",
"0.49691495",
"0.4964903",
"0.49545303",
"0.49528047",
"0.4952328",
"0.49503386",
"0.49430266",
"0.49412006",
"0.49353555",
"0.49327436",
"0.4932474",
"0.49319077",
"0.49300504",
"0.49282193",
"0.49189523",
"0.4918608",
"0.49184784",
"0.4915992",
"0.49113646",
"0.49056065",
"0.4902006",
"0.49018246",
"0.49011454",
"0.49011436"
] |
0.690508
|
0
|
An approve transaction contains one plain output .PlainOutput output = 3;
|
org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void other_statements_ok(Transaction t) {\n System.out.println(\"about to verify\");\n verify_transaction(t);\n System.out.println(\"verified\");\n make_transaction(t);\n System.out.println(\"success!\");\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"boolean hasPlainApprove();",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"void confirmTrans(ITransaction trans);",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void authorizeTransaction() {}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }",
"String showPreparedTransactions();",
"@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}",
"@Override\n\tpublic AutheConfirmPayOutput confirmPay(AutheConfirmPayInput input) {\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"TransactionResponseType createTransactionResponseType();",
"void setTransactionSuccessful();",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n\tpublic String doSth(String xml) {\n\t\tPraseXML praseXML = new PraseXML(xml);\n\t\tMap<String, String> map = praseXML.getInMessageMap();\n\t\tString loanNo=map.get(\"LOAN_NO\");\n\t\t\n\t\tString ddNo=map.get(\"DD_NO\");\n\t\t//System.out.println(loanNo+\"哈哈\"+ddNo);\n\t\tString client=\" \";\n\t\tString lender=\" \";\n\t\tString loanManager=\" \";\n\t\tString loanType=\" \";\n\t\tString loanSubType=\" \";\n\t\tString acctExec=\" \";\n\t\tString ccy=\" \";\n\t\tint ddAmt=0;\n\t\tdouble intRate=0;\n\t\tint loanAmt=0;\n\t\tint drawnAmt=0;\n\t\tString acctNo=\" \";\n\t\tConnection conn = ConnectionPool.getOneConn();\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tcs = conn.prepareCall(\"{call SP_GET_PAY_INFO(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\tcs.setString(1,loanNo);\n\t\t\tcs.setString(2,ddNo);\n\t\t\tcs.registerOutParameter(3,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(4,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(5,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(6,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(7,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(8,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(9,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(10,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(11,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(12,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(13,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(14,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.execute();\n\t\t\tclient=cs.getString(3);\n\t\t\tlender=cs.getString(4);\n\t\t\tloanManager=\" \";\n\t\t\tloanType=cs.getString(6);\n\t\t\tloanSubType=cs.getString(7);\n\t\t\tacctExec=\" \";\n\t\t\tccy=cs.getString(9);\n\t\t\tddAmt=cs.getInt(10);\n\t\t\tintRate=cs.getDouble(11);\n\t\t\tloanAmt=cs.getInt(12);\n\t\t\tdrawnAmt=cs.getInt(13);\n\t\t\tacctNo=cs.getString(14);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tpraseXML.setBodyMessage(\"CLIENT\",client);\n\t\t\n\t\t//praseXML.setBodyMessage(\"LENDER\",lender);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_MANAGER\", loanManager);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_TYPE\", loanType);\n\t\n\t\tpraseXML.setBodyMessage(\"LOAN_SUB_TYPE\", loanSubType);\n\t\n\t\tpraseXML.setBodyMessage(\"ACCT_EXEC\", acctExec);\n\t\t\n\t\tpraseXML.setBodyMessage(\"CCY\", ccy);\n\t\t\n\t\tpraseXML.setBodyMessage(\"DD_AMT\", ddAmt+\"\");\n\t\t\n\t\tpraseXML.setBodyMessage(\"INT_RATE\", intRate+\"\");\n\t\tpraseXML.setBodyMessage(\"LOAN_AMT\", loanAmt+\"\");\n\t\tpraseXML.setBodyMessage(\"DRAWN_AMT\", drawnAmt+\"\");\n\t\n\t\treturn praseXML.getRootXml();\n\t}",
"BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"@Override\n\tpublic void doFunction(String[] zInput) throws Exception {\n\t\tMessage msg = getResponseMessage(ConsensusTxn.CONSENSUS_TXNSCRIPT);\n\t\tmsg.addInteger(\"transaction\", Integer.parseInt(zInput[1]));\n\t\tmsg.addString(\"script\", zInput[2]);\n\t\tmsg.addString(\"proof\", zInput[3]);\n\t\t\t\t\n\t\tgetMainHandler().getConsensusHandler().PostMessage(msg);\n\t}",
"public ReversionResponse() {\n\t\tthis.codigoBusqueda = \"\";\n\t\tthis.idTxnNeivorResponse = 0L;\n\t\tthis.idTxnRevertida = 0L;\n\t}",
"public String approveMarriageNotice() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"approving marriage notice idUKey : \" + idUKey + \" and notice type : \" + noticeType +\n \" and with ignore warnings : \" + ignoreWarnings);\n }\n //todo remove\n //follow use to display serial number in action message ans action errors\n marriage = marriageRegistrationService.getByIdUKey(idUKey, user);\n String[] actionMassageArray = new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : Long.toString(marriage.getSerialOfMaleNotice())};\n try {\n warnings = marriageRegistrationService.\n approveMarriageNotice(idUKey, noticeType, ignoreWarnings, user);\n if (warnings.size() > 0) {\n //if warning size is more than 0 we forward in to approval warning page\n warningsAtApproval = true;\n return \"warning\";\n }\n addActionMessage(getText(\"message.approve.success\", actionMassageArray));\n logger.debug(\"successfully approved marriage notice idUKey : {} and notice type :{ }\", idUKey, noticeType);\n } catch (CRSRuntimeException e) {\n //error happens when approving marriage notice\n switch (e.getErrorCode()) {\n case ErrorCodes.OTHER_PARTY_MUST_APPROVE_FIRST:\n addActionError(getText(\"error.other.party.approve.first\",\n new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n (marriage.getSerialOfMaleNotice() != null) ?\n Long.toString(marriage.getSerialOfMaleNotice()) : getText(\"message.not.yet.add\") :\n (marriage.getSerialOfFemaleNotice() != null) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : getText(\"message.not.yet.add\")}));\n break;\n case ErrorCodes.UNABLE_APPROVE_MARRIAGE_NOTICE_PROHIBITED_RELATIONSHIP:\n addActionError(getText(\"error.approval.failed\", actionMassageArray) + \" , \" + e.getMessage());\n break;\n case ErrorCodes.BRIDES_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.brides.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.GROOMS_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.grooms.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.MORE_THAN_ONE_ACTIVE_LICENSE:\n addActionError(getText(\"error.unable.to.approve.already.issued.license\"));\n break;\n default:\n addActionError(getText(\"error.approval.failed\", actionMassageArray));\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId,\n dsDivisionId, mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return \"failed\";\n } catch (Exception e) {\n logger.debug(\"exception while approving marriage notice :idUKey \");\n return ERROR;\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId, dsDivisionId,\n mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return SUCCESS;\n }",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@OnClick(R.id.mApprovalCommit)\n void onApprovalPress() {\n String userName = mPetitionConcertUserName.getText().toString();\n// if (!userName.equals(\"\")) {\n// userName = userName.substring(1, userName.length() - 1);\n// }\n// String content = mPetitionContent.getText().toString();\n// String petitioner = mPetitioner.getText().toString();\n// String timeRange = mPetitionTimeRange.getText().toString();\n String result = mApprovalResultMenuTab.getText().toString();\n String opinion = mApprovalOpinion.getText().toString();\n if (opinion.equals(\"\")) {\n Toast.makeText(this, \"请输入审批意见\", Toast.LENGTH_SHORT).show();\n } else {\n if (mDialog == null) mDialog = new ProgressDialog(this);\n mDialog.setMessage(\"正在提交,请稍后...\");\n mDialog.setCancelable(false);\n mDialog.show();\n switch (result) {\n case \"同意\":\n mPresent.approvalAgree(approval.getRequestid(), approval.getApproveNodeId(), approval.getApprovePerson(), opinion);\n break;\n case \"不同意\":\n mPresent.approvalRefused(approval.getRequestid(), approval.getApprovePerson(), opinion);\n break;\n default:\n Log.e(TAG, \"onApprovalPress: \" + approval.getRequestid() + \"::\" + approval.getApproveNodeId() + \"::\" + approval.getApprovePerson() + \"::\" + opinion);\n break;\n }\n }\n\n\n }",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"public IBankTransfert payment();",
"@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n transaction.setAction(TransactionAction.VOID);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionVoidRequest(\n transaction.getFundingSource(),\n transaction.getProcessorResponse().getRetrievalRefNum());\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n Log.d(TAG, elavonResponse != null ? elavonResponse.toString() : \"n/a\");\n if (elavonResponse.isSuccess()) {\n Log.i(TAG, \"voidTransaction: \" + transaction.getId() + \" SUCCESS\");\n if (listener != null) {\n convergeMapper.mapTransactionResponse(elavonResponse, transaction);\n try {\n // update the transactionId w/ new void txn Id and set parent\n transaction.setParentId(transaction.getId());\n transaction.setId(UUID.randomUUID());\n listener.onResponse(transaction, requestId, null);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n } else {\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n try {\n // TODO need better error mapping\n PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n t.printStackTrace();\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n // TODO need better error mapping\n final PoyntError error = new PoyntError(PoyntError.CHECK_CARD_FAILURE);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {\n\t\tthis.reciepient = reciepient;\n\t\tthis.msg = msg;\n\t\tthis.parentTransactionId = parentTransactionId;\n\t\tthis.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);\n\t}",
"boolean hasTxnresponse();",
"public void onOutputSpent(MoneroOutputWallet output);",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public Action<PaymentState, PaymentEvent> getOverrideCode(){\n\n return ctx -> {\n log.info(\"<<< Override Code service has been called >>>\");\n if(new Random().nextInt(10) < 8){\n log.info(\"Override auth request Approved\");\n log.info(\"<<< Setting event to BAL_OK which should move the state to MAKE_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_OK).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n } else {\n log.info(\"Override auth request Rejected\");\n log.info(\"<<< Setting event to BAL_KO which should move the state to DENY_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_KO).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n }\n\n };\n }",
"@Override\r\n\tpublic ApiResult execute(ApiPayload payload) {\n\t\tlogger.info(\"============>I Publish A Advertisement, Id Is {}\", payload.getAdvertisementId());\r\n\t\treturn new ApiResult(0, \"msg\", \"{ data }\");\r\n\t}",
"public String execute() {\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}",
"public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }",
"void confirmRealWorldTrade(IUserAccount user, ITransaction trans);",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"public String crearActualizarArancel() {\n\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }",
"public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }",
"public Builder setOutput(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {\n if (outputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n output_ = value;\n onChanged();\n } else {\n outputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\ttry {\n\t\t\t//1、先创建Session\n\t\t\tSession session=HibernateUtils.getSession();\n\t\t\tsession.beginTransaction();\n\t\t\t//2、执行action\n\t\t\tString result=invocation.invoke();\t//一旦执行到这一句就会打印出sql语句\n\t\t\t\n\t\t\t//4、提交事物\n\t\t\tsession.getTransaction().commit();\t//不需要关闭session\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error\";\n\t\t}\n\t}"
] |
[
"0.6905056",
"0.676684",
"0.60999703",
"0.59211767",
"0.5917717",
"0.58865285",
"0.5746749",
"0.570026",
"0.56874937",
"0.5667086",
"0.56067413",
"0.5589704",
"0.558708",
"0.5583744",
"0.5544915",
"0.5522653",
"0.5496508",
"0.54890555",
"0.5488971",
"0.5488234",
"0.54864836",
"0.54679525",
"0.5434914",
"0.54337746",
"0.5432372",
"0.542801",
"0.5368083",
"0.5367498",
"0.53551114",
"0.5351534",
"0.53039753",
"0.52946717",
"0.5271986",
"0.5245582",
"0.5231726",
"0.52237695",
"0.5222981",
"0.5221494",
"0.5200973",
"0.5196749",
"0.5188321",
"0.51871705",
"0.51714295",
"0.5163123",
"0.5144188",
"0.5127932",
"0.5113748",
"0.51014215",
"0.5085684",
"0.5067972",
"0.5066479",
"0.50659347",
"0.506387",
"0.5054277",
"0.5035995",
"0.5033334",
"0.5032969",
"0.5032921",
"0.50327855",
"0.50307816",
"0.5023366",
"0.5018697",
"0.5018117",
"0.5016544",
"0.5014524",
"0.50063986",
"0.49992162",
"0.4994215",
"0.49895322",
"0.49891174",
"0.49865887",
"0.49829248",
"0.49823588",
"0.4975952",
"0.49755663",
"0.49743736",
"0.49696937",
"0.4964796",
"0.49553475",
"0.4953478",
"0.4952752",
"0.49508068",
"0.49428636",
"0.49427548",
"0.49357444",
"0.4933937",
"0.49329",
"0.49319673",
"0.49306977",
"0.49285278",
"0.49195758",
"0.491936",
"0.49188882",
"0.4915314",
"0.49117404",
"0.490634",
"0.49022508",
"0.49020773",
"0.49014226",
"0.49011713"
] |
0.63277423
|
2
|
Use PlainApprove.newBuilder() to construct.
|
private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public Builder mergePlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4 &&\n data_ != org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance()) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainApprove.newBuilder((org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_)\n .mergeFrom(value).buildPartial();\n } else {\n data_ = value;\n }\n onChanged();\n } else {\n if (dataCase_ == 4) {\n plainApproveBuilder_.mergeFrom(value);\n }\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove.Builder getPlainApproveBuilder() {\n return getPlainApproveFieldBuilder().getBuilder();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public Builder setPlainApprove(\n org.hyperledger.fabric.protos.token.Transaction.PlainApprove.Builder builderForValue) {\n if (plainApproveBuilder_ == null) {\n data_ = builderForValue.build();\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(builderForValue.build());\n }\n dataCase_ = 4;\n return this;\n }",
"public Builder clearPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n dataCase_ = 0;\n data_ = null;\n onChanged();\n }\n } else {\n if (dataCase_ == 4) {\n dataCase_ = 0;\n data_ = null;\n }\n plainApproveBuilder_.clear();\n }\n return this;\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainApprove, org.hyperledger.fabric.protos.token.Transaction.PlainApprove.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder> \n getPlainApproveFieldBuilder() {\n if (plainApproveBuilder_ == null) {\n if (!(dataCase_ == 4)) {\n data_ = org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n plainApproveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainApprove, org.hyperledger.fabric.protos.token.Transaction.PlainApprove.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder>(\n (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_,\n getParentForChildren(),\n isClean());\n data_ = null;\n }\n dataCase_ = 4;\n onChanged();;\n return plainApproveBuilder_;\n }",
"public void setApproveStatus(Byte approveStatus) {\n this.approveStatus = approveStatus;\n }",
"public appaporve(String id,String approve) {\n this.id = id;\n this.approve = approve;\n }",
"boolean hasPlainApprove();",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"public static ApproveRequest buildApproveRequest(Integer chatRoomID, Integer userID, Boolean isApprove) {\n ApproveRequest.Data approveRequestData = ApproveRequest.Data.builder()\n .chatRoomID(chatRoomID)\n .userID(userID)\n .isApprove(isApprove)\n .build();\n return ApproveRequest.builder()\n .request(\"approve\")\n .data(approveRequestData)\n .build();\n }",
"@ApiModelProperty(value = \"The approve action text. Defaults to 'Approve'.\")\n public String getApproveText() {\n return approveText;\n }",
"public void setApproved(boolean approved) {\n this.approved = approved;\n }",
"public\n LgtApproveTaskBuilder\n (\n MasterMgrClient mclient,\n QueueMgrClient qclient,\n BuilderInformation builderInfo\n )\n throws PipelineException\n {\n super(\"lgtApproveTask\",\n \"A builder which implements the lighting task approval operation.\", \n mclient, qclient, builderInfo);\n \n addDefaultParams();\n \n addReleaseViewParam();\n \n addSetupPass(new ApprovalSetup());\n addConstructPass(new UpdateNetworks());\n addConstructPass(new FinalizePass());\n \n setDefaultEditors(StudioDefinitions.getDefaultEditors());\n \n setLayout(getDefaultLayoutGroup());\n }",
"public void clickbtnApprove() {\n\t\twaitForElementClickable(10,btnApprove);\n\t\tclickByJavaScript(btnApprove);\n\t\tsleep(1);\n\t}",
"public ApproveWithdrawalResponseData approveWithdrawal(ApproveWithdrawalRequestData request) throws TrustlyRequestException {\n return this.sendRequest(request, ApproveWithdrawalResponseData.class, \"ApproveWithdrawal\", null);\n }",
"public void employeeServiceApprove() {\n\t\t\n\t\tEmployee employee = new Employee();\n\t\t employee.approve();\n\t}",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"@Override\n\tpublic boolean isApproved();",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"@Override\n public PreApprovalHolder build() { return new SimplePreApprovalHolder(this); }",
"public SetApprovalForAll approved(Boolean approved) {\n return set(\"approved\", approved);\n }",
"public void autoApprove(int reimburseID, String autoReason, int status);",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"private VerifyProofRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void setApprovedFlag(String value) {\r\n setAttributeInternal(APPROVEDFLAG, value);\r\n }",
"public boolean isApproved();",
"public boolean isApproved();",
"@Test\n public void revokeApproved() {\n var uid = UID.apply();\n var user = UserAuthorization.random();\n var granted = Instant.now();\n var privilege = DatasetPrivilege.CONSUMER;\n var executor = UserId.random();\n\n var grant = DatasetGrant.createApproved(\n uid, user, privilege,\n executor, granted, Markdown.lorem());\n\n /*\n * When\n */\n DatasetGrant revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(revoked)\n .as(\"The request is closed and not active after it is revoked\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember()).isNotPresent();\n assertThat(g.isOpen()).isFalse();\n assertThat(g.isActive()).isFalse();\n assertThat(g.isClosed()).isTrue();\n });\n }",
"@RequestMapping(\"/agent/enrollment/approve\")\n public String approve(@RequestParam(\"id\") long id, ApprovalDTO dto) {\n String signature = \"EnrollmentController#approve(long id, ApprovalDTO dto)\";\n LogUtil.traceEntry(getLog(), signature, new String[] { \"id\", \"dto\" }, new Object[] { id, dto });\n StatusDTO statusDTO = new StatusDTO();\n\n try {\n completeReview(id, dto, false, \"\");\n statusDTO.setSuccess(true);\n ControllerHelper.flashInfo(\"Approval request has been sent, you will be notified once it is processed.\");\n } catch (PortalServiceException ex) {\n LogUtil.traceError(getLog(), signature, ex);\n ControllerHelper.flashError(USER_ERROR_MSG);\n }\n return \"redirect:/ops/viewDashboard\";\n }",
"@Override\n\tpublic void approveForm(Context ctx) {\n\t\t//Authentication\n\t\tUser approver = ctx.sessionAttribute(\"loggedUser\");\n\t\tif (approver == null) {\n\t\t\tctx.status(401);\n\t\t\treturn;\n\t\t}\n\t\tString username = ctx.pathParam(\"username\");\n\t\tif (!approver.getUsername().equals(username)) {\n\t\t\tctx.status(403);\n\t\t\treturn;\n\t\t}\n\t\t// Implementation\n\t\tString id = ctx.pathParam(\"id\");\n\t\tForm form = fs.getForm(UUID.fromString(id));\n\t\tapprover.getAwaitingApproval().remove(form);\n\t\tus.updateUser(approver);\n\t\t// If approver is just the direct supervisor\n\t\tif (!approver.getType().equals(UserType.DEPARTMENT_HEAD) && !approver.getType().equals(UserType.BENCO)) {\n\t\t\tform.setSupervisorApproval(true);\n\t\t\tUser departmentHead = us.getUserByName(approver.getDepartmentHead());\n\t\t\tdepartmentHead.getAwaitingApproval().add(form);\n\t\t\tus.updateUser(departmentHead);\n\t\t}\n\t\t// If the approver is a department head but not a benco\n\t\tif (approver.getType().equals(UserType.DEPARTMENT_HEAD) && !approver.getType().equals(UserType.BENCO)) {\n\t\t\tform.setDepartmentApproval(true);\n\t\t\tUser benco = us.getUser(\"sol\");\n\t\t\tbenco.getAwaitingApproval().add(form);\n\t\t\tus.updateUser(benco);\n\t\t}\n\t\t// if the approver is a BenCo\n\t\tif (approver.getType().equals(UserType.BENCO)) {\n\t\t\tform.setBencoApproval(true);\n\t\t\tUser formSubmitter = us.getUserByName(form.getName());\n\t\t\tif (formSubmitter.getAvailableReimbursement() >= form.getCompensation()) {\n\t\t\t\tformSubmitter.setAvailableReimbursement(formSubmitter.getAvailableReimbursement() - form.getCompensation());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tformSubmitter.setAvailableReimbursement(0.00);\n\t\t\t}\n\t\t\tformSubmitter.getAwaitingApproval().remove(form);\n\t\t\tformSubmitter.getCompletedForms().add(form);\n\t\t\tus.updateUser(formSubmitter);\n\t\t}\n\t\t\n\t\tfs.updateForm(form);\n\t\tctx.json(form);\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"@Transactional(readOnly=false , propagation=Propagation.REQUIRED)\r\n\tpublic void approveCreateNewData ( DATA approvedData , String approverUserId ) throws Exception;",
"@RequestMapping(value = \"/{id}/approve\", method = RequestMethod.POST)\n \tpublic String approve(@PathVariable(\"id\") Long id,\n \t @RequestParam(value = \"approve\", defaultValue = \"true\", required = false) boolean approve,\n \t @RequestParam(value = \"region\", required = false) final String region, ModelMap model) {\n \t\tagentManagerService.approve(id, approve);\n \t\tmodel.addAttribute(\"region\", region);\n \t\tmodel.addAttribute(\"regions\", regionService.getAll().keySet());\n \t\treturn \"agent/list\";\n \t}",
"public void approveApplication(PersonalLoanApplication application, Applicant applicant, String message) throws SQLException, MessagingException {\r\n\t\tapplicationDao.updateLoanApplicationStatus(\"C\", application.getApplicationId());\r\n\t\tsendApplicationApprovedMail(application, applicant, message);\r\n\t}",
"ExamineApproveResult selectByPrimaryKey(Long id);",
"public void setIsApproved (boolean IsApproved);",
"public void setIsApproved (boolean IsApproved);",
"@Test\n public void acceptRevoked() {\n /*\n * Given\n */\n var uid = UID.apply();\n var user = UserAuthorization.random();\n var granted = Instant.now();\n var privilege = DatasetPrivilege.CONSUMER;\n var executor = UserId.random();\n\n var grant = DatasetGrant.createApproved(\n uid, user, privilege,\n executor, granted, Markdown.lorem());\n\n var revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * When\n */\n var approved = revoked.approve(executor, Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(approved)\n .as(\"The approval should not be successful\")\n .satisfies(a -> {\n assertThat(a.isFailure()).isTrue();\n });\n }",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public String addinit() throws Exception{\n\t\t\r\n\t\tApprove approve = approveServ.getApproveById(id);\r\n\t\t\r\n\t\trequest.setAttribute(\"approve\", approve);\r\n\t\t\r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t}",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"private ConverseRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private CreateProofRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@ApiModelProperty(value = \"An HTTPS URL to redirect the user to if the prompt is approved. This URL is kept secret until the user is redirected to it.\")\n public String getApproveRedirectUrl() {\n return approveRedirectUrl;\n }",
"public String getApprove() {\r\n if (approve == null)\r\n approve = initApproveElement().findElement(By.cssSelector(\"[data-role*='approvalStatus']\")).getText();\r\n return approve;\r\n }",
"@Nonnull\n public Approval<T> build() {\n if (converter == null) {\n try {\n converter = getConverterForPrimitive(clazz);\n } catch (IllegalArgumentException ex) {\n throw new IllegalStateException(String.format(\"You didn't provide a converter for %s and it is not a primitive type!\", clazz));\n }\n }\n if (reporter == null) {\n throw new IllegalStateException(\"You didn't provide a reporter!\");\n }\n return new Approval<T>(reporter, converter, pathMapper);\n }",
"@Test\n @Ignore\n public void testDslTriggerPRIsToApproveApprovedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRIsToApproveApprovedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestApprovedActionFilter tmp3 = (BitBucketPPRPullRequestApprovedActionFilter) tmp2.getTriggers().get(0)\n .getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestApprovedActionFilter\");\n assertTrue(isToApprove);\n }",
"public void approveApplication(MortgageApplication application, Applicant applicant, String message) throws SQLException, MessagingException {\r\n\t\tapplicationDao.updateMortgageApplicationStatus(\"C\", application.getApplicationId());\r\n\t\tsendApplicationApprovedMail(application, applicant, message);\r\n\t}",
"@Override\n\tpublic boolean isAutoApprove(String arg0) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean approvePartner(Partner partner) {\n\t\treturn false;\n\t}",
"public DocApproveRejectListModel() {\n super();\n }",
"@RequestMapping(value = \"/approve\", method = RequestMethod.GET)\n\t\tpublic String approveHunterCert(Model model,\n\t\t\t\t@RequestParam(value = \"horseName\", required = true) String name,\n\t\t\t\t@RequestParam(value = \"approve\", required = true) String approve) {\n\n\t\t\t\n\n\t\t\tif (approve.equals(\"approveStage\")) {\n\t\t\t\tmodel.addAttribute(\"horse_name\", name);\n\t\t\t\tmodel.addAttribute(\"approve\", \"approve\");\n\t\t\t\treturn \"huntercert-approveCancel\";\n\n\t\t\t}\n\n\t\t\telse if (approve.equals(\"rejectStage\")) {\n\t\t\t\tmodel.addAttribute(\"horse_name\", name);\n\t\t\t\tmodel.addAttribute(\"reject\", \"reject\");\n\t\t\t\treturn \"huntercert-approveCancel\";\n\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\telse if (approve.equals(\"approve\")) {\n\t\t\t\t\n\t\t\t\thunterCertService.approveHunterCertByHunt(Integer.parseInt(horseService.getHorses(name).get(0).getId()));\n\t\t\t\treturn \"redirect:/huntApproval/\";\n\n\t\t\t}\n\t\t\t\n\t\t\telse if(approve.equals(\"reject\")){\n\t\t\t\thunterCertService.rejectHunterCertByHunt(Integer.parseInt(horseService.getHorses(name).get(0).getId()));\n\t\t\t\treturn \"redirect:/huntApproval/\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn \"redirect:/huntApproval/\";\n\t\t\t}\n\t\t\t\n\n\t\t\n\n\t\t}",
"public boolean isApproved() {\n\t\treturn isApproved;\n\t}",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"private PlainTokenAction(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\tpublic boolean isApproved() {\n\t\treturn model.isApproved();\n\t}",
"public NFT(\n @JsonProperty(\"tokenId\") final String tokenId,\n @JsonProperty(\"owner\") final String owner,\n @JsonProperty(\"tokenURI\") final String tokenURI,\n @JsonProperty(\"approved\") final String approved) {\n super();\n this.tokenId = tokenId;\n this.owner = owner;\n this.tokenURI = tokenURI;\n this.approved = approved;\n }",
"public boolean isApproved() {\n return approved;\n }",
"private OffchainWithdrawalRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private ClientAuthorizeRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private QuestAcceptResponseProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private VerifyProofResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Test\n public void approveGrant() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var grantedAuth = GrantedAuthorization.apply(approvedBy, approvedAt, grantFor);\n var member = DatasetMember.apply(grantedAuth, privilege);\n\n /*\n * When\n */\n grant = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * Then\n */\n assertThat(grant.getRequest())\n .as(\"The request should be available in the grant.\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r).isEqualTo(request);\n }));\n\n assertThat(grant.getRequestResponse())\n .as(\"The request response should be set and it should be approved\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r)\n .extracting(\n o -> o.getExecuted().getBy(),\n o -> o.getExecuted().getAt(),\n AccessRequestResponse::isApproved)\n .containsExactly(approvedBy, approvedAt, true);\n }));\n\n assertThat(grant)\n .as(\"Since the request is approved, the grant should be active\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember())\n .isPresent()\n .get()\n .isEqualTo(member);\n\n assertThat(g.isOpen()).isFalse();\n assertThat(g.isActive()).isTrue();\n assertThat(g.isClosed()).isFalse();\n });\n }",
"protected ACLMessage handleAcceptProposal(ACLMessage cfp, ACLMessage propose,ACLMessage accept) throws FailureException \r\n\t{\r\n\t\tACLMessage inform = accept.createReply();\r\n\t\tinform.setPerformative(ACLMessage.INFORM);\r\n\t\t//TODO: devrementer le nb de trajets disponibles suite a la vente\r\n\t\treturn inform;\r\n\t}",
"private Mono<String> forceApprove(\n String baseUrl,\n String authHeader,\n BitbucketServerPullRequest pullRequest,\n String action\n ) {\n return getVersion(authHeader, baseUrl, pullRequest)\n .flatMap(version -> callApprove(baseUrl, authHeader, pullRequest, action, version));\n }",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"@WebMethod(operationName = \"approveMember\")\n public boolean approveMember(@WebParam(name = \"id\") String id) {\n return update(id, \"APPROVED\");\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public void autoApproveRequiredCEHs(CapIDModel capId, String callerID) throws AAException, RemoteException;",
"int updateByPrimaryKeySelective(ExamineApproveResult record);",
"public XxGamMaApproverByEmployeeIdLovVORowImpl() {\n }",
"@Transactional(readOnly=false , propagation=Propagation.REQUIRED)\r\n\tpublic void approveEditData ( DATA approvedData , String approverUserId ) throws Exception;",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }",
"public abstract boolean processApproveDocument(ApproveDocumentEvent approveEvent);",
"private PraiseRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private CreateProofResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\tpublic Approvatore create(long id_approvatore) {\n\t\tApprovatore approvatore = new ApprovatoreImpl();\n\n\t\tapprovatore.setNew(true);\n\t\tapprovatore.setPrimaryKey(id_approvatore);\n\n\t\treturn approvatore;\n\t}",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"@Test\n public void testDslTriggerPRApprovedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRApprovedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestApprovedActionFilter tmp3 = (BitBucketPPRPullRequestApprovedActionFilter) tmp2\n .getTriggers().get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestApprovedActionFilter\");\n assertFalse(isToApprove);\n }",
"private ProtobufVote(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"ApproveRequestsTask(final SignRequest[] requests, final ProxyConnector conn, final OperationRequestListener listener) {\n\t\tthis.requestIds = new String[requests.length];\n\t\tthis.conn = conn;\n\t\tthis.listener = listener;\n\t\tthis.t = null;\n\n\t\tfor (int i = 0; i < requests.length; i++) {\n\t\t\tthis.requestIds[i] = requests[i].getId();\n\t\t}\n\t}",
"@Override\n\tpublic void setApprovedstatus(long approvedstatus) {\n\t\t_buySellProducts.setApprovedstatus(approvedstatus);\n\t}",
"@Override\n\tpublic Boolean approveRejectLista(int statoApprovazione, String nomeLista) {\n\t\t\n\t\tLista listaElettorale = listaElettoraleDaNome(nomeLista);\n\t\t\n\t\tlistaElettorale.setStatoApprovazione(statoApprovazione);\n\t\t\n\t\t//modifica la lista elettorale dato lo stato di approvazione\n\t\tmodificaListaElettorale(listaElettorale);\n\n\t\treturn true;\n\t}",
"public void setTermsApproved() {\n mTermsApproved = true;\n }",
"protected ACLMessage handleAcceptProposal(ACLMessage cfp, ACLMessage propose, ACLMessage accept) {\r\n\t\t\tSystem.out.println(myAgent.getLocalName() + \" was accepted by \" + accept.getSender().getName());\r\n\t\t\t\r\n\t\t\t//Allocates space in superPC or queue for client\r\n\t\t\tRequiredSpecs specs = new RequiredSpecs(cfp.getContent());\r\n\t\t\tString resultMsg = allocateClient(specs, cfp.getSender().getName());\r\n\t\t\t\r\n\t\t\t// Creates reply to inform the client\r\n\t\t\tACLMessage result = accept.createReply();\r\n\t\t\tresult.setPerformative(ACLMessage.INFORM);\r\n\t\t\tresult.setContent(resultMsg);\r\n\t\t\t\r\n\t\t\treturn result;\r\n\t\t}",
"public void setApproveExpenseTime (java.lang.String approveExpenseTime) {\n\t\tthis.approveExpenseTime = approveExpenseTime;\n\t}",
"@SystemAPI\n\tboolean needsApproval();",
"public ApplyOrder(Integer id, Date applyTime, Date completeTime, BigDecimal balanceBonus, String bonusUrl, Integer applyUserId, Integer taskId, String advantageId, String status, String remarks) {\n this.id = id;\n this.applyTime = applyTime;\n this.completeTime = completeTime;\n this.balanceBonus = balanceBonus;\n this.bonusUrl = bonusUrl;\n this.applyUserId = applyUserId;\n this.taskId = taskId;\n this.advantageId = advantageId;\n this.status = status;\n this.remarks = remarks;\n }"
] |
[
"0.79254645",
"0.78238034",
"0.7777357",
"0.75124544",
"0.7503289",
"0.74995506",
"0.7341534",
"0.72829306",
"0.7174361",
"0.69630015",
"0.66648877",
"0.6529838",
"0.6370159",
"0.6289692",
"0.6065199",
"0.5846605",
"0.5837045",
"0.57773864",
"0.5727537",
"0.56509334",
"0.5630058",
"0.56030816",
"0.5594557",
"0.55909055",
"0.5547598",
"0.55403197",
"0.548195",
"0.5476598",
"0.532566",
"0.53004867",
"0.5297692",
"0.52730817",
"0.5214363",
"0.5160519",
"0.51508737",
"0.5146208",
"0.5146208",
"0.5144125",
"0.51394975",
"0.5124559",
"0.5114559",
"0.5107643",
"0.5051511",
"0.50354064",
"0.49973744",
"0.49753085",
"0.49753085",
"0.49633676",
"0.49536273",
"0.49406546",
"0.4920815",
"0.4917159",
"0.49165598",
"0.49158132",
"0.49095455",
"0.48983473",
"0.48864004",
"0.48385102",
"0.48284596",
"0.48265183",
"0.48225233",
"0.48169515",
"0.48035643",
"0.47989494",
"0.47840473",
"0.47778678",
"0.47641557",
"0.47626597",
"0.4760936",
"0.475545",
"0.47278425",
"0.4721896",
"0.4699894",
"0.46723288",
"0.46665576",
"0.46637246",
"0.46460056",
"0.46334478",
"0.46312097",
"0.46267998",
"0.4625377",
"0.46109",
"0.46061653",
"0.4606088",
"0.46051443",
"0.45997065",
"0.45883772",
"0.45573723",
"0.45475155",
"0.45471552",
"0.45432273",
"0.45343125",
"0.45278466",
"0.45180976",
"0.44705245",
"0.44653964",
"0.44628274",
"0.4456719",
"0.445107",
"0.44465283"
] |
0.81978685
|
0
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {
return inputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.5359305
|
29
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder>
getInputsOrBuilderList() {
return inputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.48500854",
"0.48500854",
"0.48500854",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.5406362
|
25
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public int getInputsCount() {
return inputs_.size();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {
return inputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.5686599
|
8
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(
int index) {
return inputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.56615967
|
11
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {
return delegatedOutputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810723",
"0.663033",
"0.6239002",
"0.61649907",
"0.6023484",
"0.59732807",
"0.59349096",
"0.59152174",
"0.5893069",
"0.5875147",
"0.58427185",
"0.5825095",
"0.58109254",
"0.5807792",
"0.5775515",
"0.57527643",
"0.562435",
"0.556856",
"0.5544129",
"0.551485",
"0.5508642",
"0.54887277",
"0.5425073",
"0.540994",
"0.53812236",
"0.53406304",
"0.5319898",
"0.5246159",
"0.5198464",
"0.51295495",
"0.51200753",
"0.511249",
"0.511249",
"0.511249",
"0.50996006",
"0.50996006",
"0.50996006",
"0.5070361",
"0.5025559",
"0.5024416",
"0.5001941",
"0.49931648",
"0.49620268",
"0.49165162",
"0.49165162",
"0.49165162",
"0.49135458",
"0.48873204",
"0.48795903",
"0.48660126",
"0.4841015",
"0.4841015",
"0.4841015",
"0.47676232",
"0.47676232",
"0.47676232",
"0.4743882",
"0.4743882",
"0.4743882",
"0.47401008",
"0.47401008",
"0.47401008",
"0.4731655",
"0.4716137",
"0.46792915",
"0.46775723",
"0.4658639",
"0.4658314",
"0.4657267",
"0.465286",
"0.465286",
"0.465286",
"0.4648436",
"0.46381873",
"0.4629865",
"0.46250972",
"0.46029666",
"0.46029666",
"0.46029666",
"0.46025229",
"0.45851484",
"0.4584073",
"0.45704553",
"0.45415875",
"0.4538899",
"0.4538899",
"0.4538899",
"0.45140615",
"0.4510431",
"0.4510431",
"0.4508737",
"0.45065948",
"0.45063406",
"0.44955102",
"0.44845608",
"0.44819924",
"0.44716975",
"0.44716975",
"0.44716975",
"0.44707522"
] |
0.585068
|
10
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>
getDelegatedOutputsOrBuilderList() {
return delegatedOutputs_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }"
] |
[
"0.6811925",
"0.66320944",
"0.6239035",
"0.61646163",
"0.6022585",
"0.59336436",
"0.5916377",
"0.58924127",
"0.5877075",
"0.5849665",
"0.5841364",
"0.5826749",
"0.5810729",
"0.58076257",
"0.5774995",
"0.5753915",
"0.56252986",
"0.55663455",
"0.5544947",
"0.5516319",
"0.5509012",
"0.5487342",
"0.5426634",
"0.5408882",
"0.53806275",
"0.5340447",
"0.53176206",
"0.5246001",
"0.51993936",
"0.51282716",
"0.51208323",
"0.5111216",
"0.5111216",
"0.5111216",
"0.50977045",
"0.50977045",
"0.50977045",
"0.5068381",
"0.5026949",
"0.5023344",
"0.5001428",
"0.4994233",
"0.4961339",
"0.49163628",
"0.49137306",
"0.49137306",
"0.49137306",
"0.4887088",
"0.48786744",
"0.48671758",
"0.48388132",
"0.48388132",
"0.48388132",
"0.47651175",
"0.47651175",
"0.47651175",
"0.4742248",
"0.4742248",
"0.4742248",
"0.47372976",
"0.47372976",
"0.47372976",
"0.4732805",
"0.47159594",
"0.4680566",
"0.46731007",
"0.4660316",
"0.46585292",
"0.4655745",
"0.46509713",
"0.46509713",
"0.46509713",
"0.46487817",
"0.4638493",
"0.46294755",
"0.4624831",
"0.46036878",
"0.46008673",
"0.46008673",
"0.46008673",
"0.458685",
"0.4582057",
"0.45708779",
"0.45425072",
"0.45363072",
"0.45363072",
"0.45363072",
"0.45136884",
"0.45102423",
"0.4509745",
"0.4509745",
"0.45072234",
"0.4506",
"0.44966692",
"0.4484575",
"0.44821417",
"0.4471641",
"0.44701064",
"0.44701064",
"0.44701064"
] |
0.5972006
|
5
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
public int getDelegatedOutputsCount() {
return delegatedOutputs_.size();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810038",
"0.6629777",
"0.6238801",
"0.6164657",
"0.60224277",
"0.5971631",
"0.5933379",
"0.5914245",
"0.5892375",
"0.5874306",
"0.58488804",
"0.5841512",
"0.582411",
"0.5810432",
"0.58058316",
"0.5774716",
"0.575164",
"0.5623772",
"0.55439883",
"0.5516545",
"0.5506967",
"0.5487345",
"0.5424322",
"0.5408481",
"0.5379821",
"0.53395766",
"0.53190064",
"0.5244892",
"0.5199916",
"0.512763",
"0.51184136",
"0.51123464",
"0.51123464",
"0.51123464",
"0.5099493",
"0.5099493",
"0.5099493",
"0.5069081",
"0.50246644",
"0.5022794",
"0.50007355",
"0.49942732",
"0.49604416",
"0.49155504",
"0.49155504",
"0.49155504",
"0.49145615",
"0.48879603",
"0.48786497",
"0.48652127",
"0.48406288",
"0.48406288",
"0.48406288",
"0.4766698",
"0.4766698",
"0.4766698",
"0.47417954",
"0.47417954",
"0.47417954",
"0.47387183",
"0.47387183",
"0.47387183",
"0.47322088",
"0.4716459",
"0.46793035",
"0.4675995",
"0.46604714",
"0.46574828",
"0.46552297",
"0.4652713",
"0.4652713",
"0.4652713",
"0.46510527",
"0.46372354",
"0.46299455",
"0.46241254",
"0.46041635",
"0.46017632",
"0.46017632",
"0.46017632",
"0.45861238",
"0.45814008",
"0.45725107",
"0.45415488",
"0.45378754",
"0.45378754",
"0.45378754",
"0.45130745",
"0.4509503",
"0.4509503",
"0.45081475",
"0.45053682",
"0.45053148",
"0.44961858",
"0.4486127",
"0.44833606",
"0.44714507",
"0.44714507",
"0.44714507",
"0.44708645"
] |
0.5567059
|
18
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {
return delegatedOutputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n return delegatedOutputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810038",
"0.6629777",
"0.6238801",
"0.6164657",
"0.60224277",
"0.5971631",
"0.5933379",
"0.5914245",
"0.5892375",
"0.5874306",
"0.58488804",
"0.5841512",
"0.582411",
"0.5810432",
"0.58058316",
"0.575164",
"0.5623772",
"0.5567059",
"0.55439883",
"0.5516545",
"0.5506967",
"0.5487345",
"0.5424322",
"0.5408481",
"0.5379821",
"0.53395766",
"0.53190064",
"0.5244892",
"0.5199916",
"0.512763",
"0.51184136",
"0.51123464",
"0.51123464",
"0.51123464",
"0.5099493",
"0.5099493",
"0.5099493",
"0.5069081",
"0.50246644",
"0.5022794",
"0.50007355",
"0.49942732",
"0.49604416",
"0.49155504",
"0.49155504",
"0.49155504",
"0.49145615",
"0.48879603",
"0.48786497",
"0.48652127",
"0.48406288",
"0.48406288",
"0.48406288",
"0.4766698",
"0.4766698",
"0.4766698",
"0.47417954",
"0.47417954",
"0.47417954",
"0.47387183",
"0.47387183",
"0.47387183",
"0.47322088",
"0.4716459",
"0.46793035",
"0.4675995",
"0.46604714",
"0.46574828",
"0.46552297",
"0.4652713",
"0.4652713",
"0.4652713",
"0.46510527",
"0.46372354",
"0.46299455",
"0.46241254",
"0.46041635",
"0.46017632",
"0.46017632",
"0.46017632",
"0.45861238",
"0.45814008",
"0.45725107",
"0.45415488",
"0.45378754",
"0.45378754",
"0.45378754",
"0.45130745",
"0.4509503",
"0.4509503",
"0.45081475",
"0.45053682",
"0.45053148",
"0.44961858",
"0.4486127",
"0.44833606",
"0.44714507",
"0.44714507",
"0.44714507",
"0.44708645"
] |
0.5774716
|
15
|
An approve transaction contains one or more plain delegated outputs repeated .PlainDelegatedOutput delegated_outputs = 2;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(
int index) {
return delegatedOutputs_.get(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index);",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n return delegatedOutputs_;\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> \n getDelegatedOutputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n return getDelegatedOutput();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputsOrBuilder(\n int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index); } else {\n return delegatedOutputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n return delegatedOutputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput() {\n if (delegatedOutputBuilder_ == null) {\n return delegatedOutput_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n } else {\n return delegatedOutputBuilder_.getMessage();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.get(index);\n } else {\n return delegatedOutputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder() {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutputs(int index) {\n return delegatedOutputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder() {\n if (delegatedOutputBuilder_ != null) {\n return delegatedOutputBuilder_.getMessageOrBuilder();\n } else {\n return delegatedOutput_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance() : delegatedOutput_;\n }\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"public int getDelegatedOutputsCount() {\n return delegatedOutputs_.size();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"public Builder addDelegatedOutputs(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputsOrBuilderList() {\n if (delegatedOutputsBuilder_ != null) {\n return delegatedOutputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n }\n }",
"public Builder setDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n delegatedOutput_ = value;\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> getDelegatedOutputsList() {\n if (delegatedOutputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(delegatedOutputs_);\n } else {\n return delegatedOutputsBuilder_.getMessageList();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder addDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().addBuilder(\n index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.getDefaultInstance());\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"int getDelegatedOutputsCount();",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, value);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, value);\n }\n return this;\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputBuilder() {\n \n onChanged();\n return getDelegatedOutputFieldBuilder().getBuilder();\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index);",
"public int getDelegatedOutputsCount() {\n if (delegatedOutputsBuilder_ == null) {\n return delegatedOutputs_.size();\n } else {\n return delegatedOutputsBuilder_.getCount();\n }\n }",
"public Builder mergeDelegatedOutput(org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput value) {\n if (delegatedOutputBuilder_ == null) {\n if (delegatedOutput_ != null) {\n delegatedOutput_ =\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.newBuilder(delegatedOutput_).mergeFrom(value).buildPartial();\n } else {\n delegatedOutput_ = value;\n }\n onChanged();\n } else {\n delegatedOutputBuilder_.mergeFrom(value);\n }\n\n return this;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder getDelegatedOutputsBuilder(\n int index) {\n return getDelegatedOutputsFieldBuilder().getBuilder(index);\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public Builder addAllDelegatedOutputs(\n java.lang.Iterable<? extends org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput> values) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, delegatedOutputs_);\n onChanged();\n } else {\n delegatedOutputsBuilder_.addAllMessages(values);\n }\n return this;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList();",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n public boolean willGenerateOutput(final CustomerTransactionVO ct) {\n\n ItemInvoiceVO itemInvoice = CTHelper.getPaymentItemInvoiceVO(ct);\n return (itemInvoice != null) &&\n (itemInvoice.getInvoiceParameters() != null) &&\n (itemInvoice.getInvoiceParameters().getXclickParameters() != null) &&\n isXClickParametersValid(itemInvoice.getInvoiceParameters().getXclickParameters());\n }",
"boolean hasDelegatedOutput();",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder> \n getDelegatedOutputFieldBuilder() {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder>(\n getDelegatedOutput(),\n getParentForChildren(),\n isClean());\n delegatedOutput_ = null;\n }\n return delegatedOutputBuilder_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n return outputs_.get(index);\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n return outputs_;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput.Builder addOutputsBuilder() {\n return getOutputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance());\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> \n getOutputsList();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"private void prsSameWADOResp(AssertionEngine engine, Assertion a, OMElement assertion_output)\n throws XdsInternalException {\n try {\n OMElement std = getStdElement(\"HttpResponseCodes\");\n // process Transactions elements\n Integer defaultCode = 200;\n Map <Integer, Integer> codes = new HashMap <>();\n for (OMElement transactionE : XmlUtil.childrenWithLocalName(std, \"Transactions\")) {\n String id = XmlUtil.getAttributeValue(transactionE, \"id\");\n String codeS = XmlUtil.getAttributeValue(transactionE, \"code\");\n log.fine(\"Transactions id=[\" + id + \"] code=[\" + codeS + \"].\");\n if (StringUtils.isBlank(id)) throw new Exception(\"empty id\");\n Integer code = Integer.parseInt(codeS);\n for (String tok : id.split(\",\")) {\n String[] s = tok.split(\"-\", 2);\n if (s.length == 1) {\n if (s[0].equals(\"*\")) {\n defaultCode = code;\n continue;\n }\n codes.put(Integer.parseInt(s[0]), code);\n continue;\n }\n int first = Integer.parseInt(s[0]);\n int last = Integer.parseInt(s[1]);\n for (Integer i = first; i <= last; i++ )\n codes.put(i, code);\n }\n }\n // process individual WADO request transactions\n OMElement transactionsElement = getTestTrans(a, \"\");\n for (OMElement transactionElement : XmlUtil.childrenWithLocalName(transactionsElement, \"Transaction\")) {\n String idS = XmlUtil.getAttributeValue(transactionElement, \"id\");\n Integer id = Integer.parseInt(idS);\n Integer expectedCode = codes.get(id);\n if (expectedCode == null) expectedCode = defaultCode;\n String msg = \"WADO trans \" + idS + \" status: expected [\" + expectedCode.toString() + \"] \";\n OMElement codeElement = XmlUtil.firstChildChain(transactionElement, \"Status\", \"Code\");\n if (codeElement == null) {\n store(engine, CAT.ERROR, msg + \"found null\");\n continue;\n }\n String foundCodeS = codeElement.getText();\n Integer foundCode = null;\n try {\n foundCode = Integer.parseInt(foundCodeS);\n } catch (NumberFormatException e) {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n continue;\n }\n if (expectedCode.equals(foundCode)) {\n store(engine, CAT.SUCCESS, msg + \"matched.\");\n } else {\n store(engine, CAT.ERROR, msg + \"found [\" + foundCodeS + \"]\");\n }\n }\n } catch (Exception e) {\n throw new XdsInternalException(\"sameWADOResp error: \" + e.getMessage());\n }\n }",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"void setOutputs(List<ContractIOType> outputs) {\n this.outputs = outputs;\n }",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public Builder setDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.set(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputsOrBuilder(\n int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index); } else {\n return outputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"@Test\n public void canGetApprovalsWithAutoApproveTrue() {\n addApproval(marissa.getId(), \"c1\", \"uaa.user\", 6000, APPROVED);\n addApproval(marissa.getId(), \"c1\", \"uaa.admin\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"openid\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n\n addApproval(marissa.getId(), \"c1\", \"read\", 12000, DENIED);\n addApproval(marissa.getId(), \"c1\", \"write\", 6000, APPROVED);\n\n assertEquals(3, endpoints.getApprovals(\"user_id eq \\\"\"+marissa.getId()+\"\\\"\", 1, 100).size());\n }",
"public Builder addDelegatedOutputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(index, builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainOutput> getOutputsList() {\n return outputs_;\n }",
"@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }",
"boolean outputClaimedInSameBranch(BlockChainLink link, TransactionInput in);",
"public Builder clearDelegatedOutputs() {\n if (delegatedOutputsBuilder_ == null) {\n delegatedOutputs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n delegatedOutputsBuilder_.clear();\n }\n return this;\n }",
"boolean hasPlainApprove();",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder> \n getOutputsOrBuilderList() {\n if (outputsBuilder_ != null) {\n return outputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(outputs_);\n }\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"OutputPin getResult();",
"OutputPin getResult();",
"public Builder setDelegatedOutput(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputBuilder_ == null) {\n delegatedOutput_ = builderForValue.build();\n onChanged();\n } else {\n delegatedOutputBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }",
"public Builder addDelegatedOutputs(\n org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder builderForValue) {\n if (delegatedOutputsBuilder_ == null) {\n ensureDelegatedOutputsIsMutable();\n delegatedOutputs_.add(builderForValue.build());\n onChanged();\n } else {\n delegatedOutputsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public String getPaymentCompletedStaticResponse(){\n String resp=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\n \"<ns0:debitcompletedresponse xmlns:ns0=\\\"http://www.ericsson.com/em/emm\\\"/>\";\n \n return resp;\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutputs(int index) {\n if (outputsBuilder_ == null) {\n return outputs_.get(index);\n } else {\n return outputsBuilder_.getMessage(index);\n }\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }"
] |
[
"0.6810723",
"0.663033",
"0.6239002",
"0.61649907",
"0.59732807",
"0.59349096",
"0.59152174",
"0.5893069",
"0.5875147",
"0.585068",
"0.58427185",
"0.5825095",
"0.58109254",
"0.5807792",
"0.5775515",
"0.57527643",
"0.562435",
"0.556856",
"0.5544129",
"0.551485",
"0.5508642",
"0.54887277",
"0.5425073",
"0.540994",
"0.53812236",
"0.53406304",
"0.5319898",
"0.5246159",
"0.5198464",
"0.51295495",
"0.51200753",
"0.511249",
"0.511249",
"0.511249",
"0.50996006",
"0.50996006",
"0.50996006",
"0.5070361",
"0.5025559",
"0.5024416",
"0.5001941",
"0.49931648",
"0.49620268",
"0.49165162",
"0.49165162",
"0.49165162",
"0.49135458",
"0.48873204",
"0.48795903",
"0.48660126",
"0.4841015",
"0.4841015",
"0.4841015",
"0.47676232",
"0.47676232",
"0.47676232",
"0.4743882",
"0.4743882",
"0.4743882",
"0.47401008",
"0.47401008",
"0.47401008",
"0.4731655",
"0.4716137",
"0.46792915",
"0.46775723",
"0.4658639",
"0.4658314",
"0.4657267",
"0.465286",
"0.465286",
"0.465286",
"0.4648436",
"0.46381873",
"0.4629865",
"0.46250972",
"0.46029666",
"0.46029666",
"0.46029666",
"0.46025229",
"0.45851484",
"0.4584073",
"0.45704553",
"0.45415875",
"0.4538899",
"0.4538899",
"0.4538899",
"0.45140615",
"0.4510431",
"0.4510431",
"0.4508737",
"0.45065948",
"0.45063406",
"0.44955102",
"0.44845608",
"0.44819924",
"0.44716975",
"0.44716975",
"0.44716975",
"0.44707522"
] |
0.6023484
|
4
|
An approve transaction contains one plain output .PlainOutput output = 3;
|
public boolean hasOutput() {
return output_ != null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void other_statements_ok(Transaction t) {\n System.out.println(\"about to verify\");\n verify_transaction(t);\n System.out.println(\"verified\");\n make_transaction(t);\n System.out.println(\"success!\");\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"boolean hasPlainApprove();",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"TxnResponseProto.TxnResponse getTxnresponse();",
"void confirmTrans(ITransaction trans);",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void authorizeTransaction() {}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }",
"String showPreparedTransactions();",
"@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}",
"@Override\n\tpublic AutheConfirmPayOutput confirmPay(AutheConfirmPayInput input) {\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"TransactionResponseType createTransactionResponseType();",
"void setTransactionSuccessful();",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n\tpublic String doSth(String xml) {\n\t\tPraseXML praseXML = new PraseXML(xml);\n\t\tMap<String, String> map = praseXML.getInMessageMap();\n\t\tString loanNo=map.get(\"LOAN_NO\");\n\t\t\n\t\tString ddNo=map.get(\"DD_NO\");\n\t\t//System.out.println(loanNo+\"哈哈\"+ddNo);\n\t\tString client=\" \";\n\t\tString lender=\" \";\n\t\tString loanManager=\" \";\n\t\tString loanType=\" \";\n\t\tString loanSubType=\" \";\n\t\tString acctExec=\" \";\n\t\tString ccy=\" \";\n\t\tint ddAmt=0;\n\t\tdouble intRate=0;\n\t\tint loanAmt=0;\n\t\tint drawnAmt=0;\n\t\tString acctNo=\" \";\n\t\tConnection conn = ConnectionPool.getOneConn();\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tcs = conn.prepareCall(\"{call SP_GET_PAY_INFO(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\tcs.setString(1,loanNo);\n\t\t\tcs.setString(2,ddNo);\n\t\t\tcs.registerOutParameter(3,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(4,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(5,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(6,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(7,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(8,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(9,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(10,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(11,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(12,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(13,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(14,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.execute();\n\t\t\tclient=cs.getString(3);\n\t\t\tlender=cs.getString(4);\n\t\t\tloanManager=\" \";\n\t\t\tloanType=cs.getString(6);\n\t\t\tloanSubType=cs.getString(7);\n\t\t\tacctExec=\" \";\n\t\t\tccy=cs.getString(9);\n\t\t\tddAmt=cs.getInt(10);\n\t\t\tintRate=cs.getDouble(11);\n\t\t\tloanAmt=cs.getInt(12);\n\t\t\tdrawnAmt=cs.getInt(13);\n\t\t\tacctNo=cs.getString(14);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tpraseXML.setBodyMessage(\"CLIENT\",client);\n\t\t\n\t\t//praseXML.setBodyMessage(\"LENDER\",lender);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_MANAGER\", loanManager);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_TYPE\", loanType);\n\t\n\t\tpraseXML.setBodyMessage(\"LOAN_SUB_TYPE\", loanSubType);\n\t\n\t\tpraseXML.setBodyMessage(\"ACCT_EXEC\", acctExec);\n\t\t\n\t\tpraseXML.setBodyMessage(\"CCY\", ccy);\n\t\t\n\t\tpraseXML.setBodyMessage(\"DD_AMT\", ddAmt+\"\");\n\t\t\n\t\tpraseXML.setBodyMessage(\"INT_RATE\", intRate+\"\");\n\t\tpraseXML.setBodyMessage(\"LOAN_AMT\", loanAmt+\"\");\n\t\tpraseXML.setBodyMessage(\"DRAWN_AMT\", drawnAmt+\"\");\n\t\n\t\treturn praseXML.getRootXml();\n\t}",
"BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"@Override\n\tpublic void doFunction(String[] zInput) throws Exception {\n\t\tMessage msg = getResponseMessage(ConsensusTxn.CONSENSUS_TXNSCRIPT);\n\t\tmsg.addInteger(\"transaction\", Integer.parseInt(zInput[1]));\n\t\tmsg.addString(\"script\", zInput[2]);\n\t\tmsg.addString(\"proof\", zInput[3]);\n\t\t\t\t\n\t\tgetMainHandler().getConsensusHandler().PostMessage(msg);\n\t}",
"public ReversionResponse() {\n\t\tthis.codigoBusqueda = \"\";\n\t\tthis.idTxnNeivorResponse = 0L;\n\t\tthis.idTxnRevertida = 0L;\n\t}",
"public String approveMarriageNotice() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"approving marriage notice idUKey : \" + idUKey + \" and notice type : \" + noticeType +\n \" and with ignore warnings : \" + ignoreWarnings);\n }\n //todo remove\n //follow use to display serial number in action message ans action errors\n marriage = marriageRegistrationService.getByIdUKey(idUKey, user);\n String[] actionMassageArray = new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : Long.toString(marriage.getSerialOfMaleNotice())};\n try {\n warnings = marriageRegistrationService.\n approveMarriageNotice(idUKey, noticeType, ignoreWarnings, user);\n if (warnings.size() > 0) {\n //if warning size is more than 0 we forward in to approval warning page\n warningsAtApproval = true;\n return \"warning\";\n }\n addActionMessage(getText(\"message.approve.success\", actionMassageArray));\n logger.debug(\"successfully approved marriage notice idUKey : {} and notice type :{ }\", idUKey, noticeType);\n } catch (CRSRuntimeException e) {\n //error happens when approving marriage notice\n switch (e.getErrorCode()) {\n case ErrorCodes.OTHER_PARTY_MUST_APPROVE_FIRST:\n addActionError(getText(\"error.other.party.approve.first\",\n new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n (marriage.getSerialOfMaleNotice() != null) ?\n Long.toString(marriage.getSerialOfMaleNotice()) : getText(\"message.not.yet.add\") :\n (marriage.getSerialOfFemaleNotice() != null) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : getText(\"message.not.yet.add\")}));\n break;\n case ErrorCodes.UNABLE_APPROVE_MARRIAGE_NOTICE_PROHIBITED_RELATIONSHIP:\n addActionError(getText(\"error.approval.failed\", actionMassageArray) + \" , \" + e.getMessage());\n break;\n case ErrorCodes.BRIDES_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.brides.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.GROOMS_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.grooms.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.MORE_THAN_ONE_ACTIVE_LICENSE:\n addActionError(getText(\"error.unable.to.approve.already.issued.license\"));\n break;\n default:\n addActionError(getText(\"error.approval.failed\", actionMassageArray));\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId,\n dsDivisionId, mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return \"failed\";\n } catch (Exception e) {\n logger.debug(\"exception while approving marriage notice :idUKey \");\n return ERROR;\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId, dsDivisionId,\n mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return SUCCESS;\n }",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@OnClick(R.id.mApprovalCommit)\n void onApprovalPress() {\n String userName = mPetitionConcertUserName.getText().toString();\n// if (!userName.equals(\"\")) {\n// userName = userName.substring(1, userName.length() - 1);\n// }\n// String content = mPetitionContent.getText().toString();\n// String petitioner = mPetitioner.getText().toString();\n// String timeRange = mPetitionTimeRange.getText().toString();\n String result = mApprovalResultMenuTab.getText().toString();\n String opinion = mApprovalOpinion.getText().toString();\n if (opinion.equals(\"\")) {\n Toast.makeText(this, \"请输入审批意见\", Toast.LENGTH_SHORT).show();\n } else {\n if (mDialog == null) mDialog = new ProgressDialog(this);\n mDialog.setMessage(\"正在提交,请稍后...\");\n mDialog.setCancelable(false);\n mDialog.show();\n switch (result) {\n case \"同意\":\n mPresent.approvalAgree(approval.getRequestid(), approval.getApproveNodeId(), approval.getApprovePerson(), opinion);\n break;\n case \"不同意\":\n mPresent.approvalRefused(approval.getRequestid(), approval.getApprovePerson(), opinion);\n break;\n default:\n Log.e(TAG, \"onApprovalPress: \" + approval.getRequestid() + \"::\" + approval.getApproveNodeId() + \"::\" + approval.getApprovePerson() + \"::\" + opinion);\n break;\n }\n }\n\n\n }",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"public IBankTransfert payment();",
"@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n transaction.setAction(TransactionAction.VOID);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionVoidRequest(\n transaction.getFundingSource(),\n transaction.getProcessorResponse().getRetrievalRefNum());\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n Log.d(TAG, elavonResponse != null ? elavonResponse.toString() : \"n/a\");\n if (elavonResponse.isSuccess()) {\n Log.i(TAG, \"voidTransaction: \" + transaction.getId() + \" SUCCESS\");\n if (listener != null) {\n convergeMapper.mapTransactionResponse(elavonResponse, transaction);\n try {\n // update the transactionId w/ new void txn Id and set parent\n transaction.setParentId(transaction.getId());\n transaction.setId(UUID.randomUUID());\n listener.onResponse(transaction, requestId, null);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n } else {\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n try {\n // TODO need better error mapping\n PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n t.printStackTrace();\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n // TODO need better error mapping\n final PoyntError error = new PoyntError(PoyntError.CHECK_CARD_FAILURE);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {\n\t\tthis.reciepient = reciepient;\n\t\tthis.msg = msg;\n\t\tthis.parentTransactionId = parentTransactionId;\n\t\tthis.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);\n\t}",
"boolean hasTxnresponse();",
"public void onOutputSpent(MoneroOutputWallet output);",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public Action<PaymentState, PaymentEvent> getOverrideCode(){\n\n return ctx -> {\n log.info(\"<<< Override Code service has been called >>>\");\n if(new Random().nextInt(10) < 8){\n log.info(\"Override auth request Approved\");\n log.info(\"<<< Setting event to BAL_OK which should move the state to MAKE_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_OK).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n } else {\n log.info(\"Override auth request Rejected\");\n log.info(\"<<< Setting event to BAL_KO which should move the state to DENY_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_KO).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n }\n\n };\n }",
"@Override\r\n\tpublic ApiResult execute(ApiPayload payload) {\n\t\tlogger.info(\"============>I Publish A Advertisement, Id Is {}\", payload.getAdvertisementId());\r\n\t\treturn new ApiResult(0, \"msg\", \"{ data }\");\r\n\t}",
"public String execute() {\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}",
"public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }",
"void confirmRealWorldTrade(IUserAccount user, ITransaction trans);",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"public String crearActualizarArancel() {\n\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }",
"public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }",
"public Builder setOutput(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {\n if (outputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n output_ = value;\n onChanged();\n } else {\n outputBuilder_.setMessage(value);\n }\n\n return this;\n }",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\ttry {\n\t\t\t//1、先创建Session\n\t\t\tSession session=HibernateUtils.getSession();\n\t\t\tsession.beginTransaction();\n\t\t\t//2、执行action\n\t\t\tString result=invocation.invoke();\t//一旦执行到这一句就会打印出sql语句\n\t\t\t\n\t\t\t//4、提交事物\n\t\t\tsession.getTransaction().commit();\t//不需要关闭session\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error\";\n\t\t}\n\t}"
] |
[
"0.6905056",
"0.676684",
"0.63277423",
"0.60999703",
"0.59211767",
"0.5917717",
"0.58865285",
"0.5746749",
"0.570026",
"0.56874937",
"0.5667086",
"0.56067413",
"0.5589704",
"0.558708",
"0.5583744",
"0.5544915",
"0.5522653",
"0.5496508",
"0.54890555",
"0.5488971",
"0.5488234",
"0.54864836",
"0.54679525",
"0.5434914",
"0.54337746",
"0.5432372",
"0.542801",
"0.5368083",
"0.5367498",
"0.53551114",
"0.5351534",
"0.53039753",
"0.52946717",
"0.5271986",
"0.5245582",
"0.5231726",
"0.52237695",
"0.5222981",
"0.5221494",
"0.5200973",
"0.5196749",
"0.5188321",
"0.51871705",
"0.51714295",
"0.5163123",
"0.5144188",
"0.5127932",
"0.5113748",
"0.51014215",
"0.5085684",
"0.5067972",
"0.5066479",
"0.50659347",
"0.506387",
"0.5054277",
"0.5035995",
"0.5033334",
"0.5032969",
"0.5032921",
"0.50327855",
"0.50307816",
"0.5023366",
"0.5018697",
"0.5018117",
"0.5016544",
"0.5014524",
"0.50063986",
"0.49992162",
"0.4994215",
"0.49895322",
"0.49891174",
"0.49865887",
"0.49829248",
"0.49823588",
"0.4975952",
"0.49755663",
"0.49743736",
"0.49696937",
"0.4964796",
"0.49553475",
"0.4953478",
"0.4952752",
"0.49508068",
"0.49428636",
"0.49427548",
"0.49357444",
"0.4933937",
"0.49329",
"0.49319673",
"0.49306977",
"0.49285278",
"0.49195758",
"0.491936",
"0.49188882",
"0.4915314",
"0.49117404",
"0.490634",
"0.49022508",
"0.49020773",
"0.49014226",
"0.49011713"
] |
0.0
|
-1
|
An approve transaction contains one plain output .PlainOutput output = 3;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {
return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void other_statements_ok(Transaction t) {\n System.out.println(\"about to verify\");\n verify_transaction(t);\n System.out.println(\"verified\");\n make_transaction(t);\n System.out.println(\"success!\");\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"boolean hasPlainApprove();",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"void confirmTrans(ITransaction trans);",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void authorizeTransaction() {}",
"String showPreparedTransactions();",
"@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}",
"@Override\n\tpublic AutheConfirmPayOutput confirmPay(AutheConfirmPayInput input) {\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n return getOutput();\n }",
"TransactionResponseType createTransactionResponseType();",
"void setTransactionSuccessful();",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n\tpublic String doSth(String xml) {\n\t\tPraseXML praseXML = new PraseXML(xml);\n\t\tMap<String, String> map = praseXML.getInMessageMap();\n\t\tString loanNo=map.get(\"LOAN_NO\");\n\t\t\n\t\tString ddNo=map.get(\"DD_NO\");\n\t\t//System.out.println(loanNo+\"哈哈\"+ddNo);\n\t\tString client=\" \";\n\t\tString lender=\" \";\n\t\tString loanManager=\" \";\n\t\tString loanType=\" \";\n\t\tString loanSubType=\" \";\n\t\tString acctExec=\" \";\n\t\tString ccy=\" \";\n\t\tint ddAmt=0;\n\t\tdouble intRate=0;\n\t\tint loanAmt=0;\n\t\tint drawnAmt=0;\n\t\tString acctNo=\" \";\n\t\tConnection conn = ConnectionPool.getOneConn();\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tcs = conn.prepareCall(\"{call SP_GET_PAY_INFO(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\tcs.setString(1,loanNo);\n\t\t\tcs.setString(2,ddNo);\n\t\t\tcs.registerOutParameter(3,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(4,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(5,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(6,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(7,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(8,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(9,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(10,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(11,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(12,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(13,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(14,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.execute();\n\t\t\tclient=cs.getString(3);\n\t\t\tlender=cs.getString(4);\n\t\t\tloanManager=\" \";\n\t\t\tloanType=cs.getString(6);\n\t\t\tloanSubType=cs.getString(7);\n\t\t\tacctExec=\" \";\n\t\t\tccy=cs.getString(9);\n\t\t\tddAmt=cs.getInt(10);\n\t\t\tintRate=cs.getDouble(11);\n\t\t\tloanAmt=cs.getInt(12);\n\t\t\tdrawnAmt=cs.getInt(13);\n\t\t\tacctNo=cs.getString(14);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tpraseXML.setBodyMessage(\"CLIENT\",client);\n\t\t\n\t\t//praseXML.setBodyMessage(\"LENDER\",lender);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_MANAGER\", loanManager);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_TYPE\", loanType);\n\t\n\t\tpraseXML.setBodyMessage(\"LOAN_SUB_TYPE\", loanSubType);\n\t\n\t\tpraseXML.setBodyMessage(\"ACCT_EXEC\", acctExec);\n\t\t\n\t\tpraseXML.setBodyMessage(\"CCY\", ccy);\n\t\t\n\t\tpraseXML.setBodyMessage(\"DD_AMT\", ddAmt+\"\");\n\t\t\n\t\tpraseXML.setBodyMessage(\"INT_RATE\", intRate+\"\");\n\t\tpraseXML.setBodyMessage(\"LOAN_AMT\", loanAmt+\"\");\n\t\tpraseXML.setBodyMessage(\"DRAWN_AMT\", drawnAmt+\"\");\n\t\n\t\treturn praseXML.getRootXml();\n\t}",
"BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"@Override\n\tpublic void doFunction(String[] zInput) throws Exception {\n\t\tMessage msg = getResponseMessage(ConsensusTxn.CONSENSUS_TXNSCRIPT);\n\t\tmsg.addInteger(\"transaction\", Integer.parseInt(zInput[1]));\n\t\tmsg.addString(\"script\", zInput[2]);\n\t\tmsg.addString(\"proof\", zInput[3]);\n\t\t\t\t\n\t\tgetMainHandler().getConsensusHandler().PostMessage(msg);\n\t}",
"public ReversionResponse() {\n\t\tthis.codigoBusqueda = \"\";\n\t\tthis.idTxnNeivorResponse = 0L;\n\t\tthis.idTxnRevertida = 0L;\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public String approveMarriageNotice() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"approving marriage notice idUKey : \" + idUKey + \" and notice type : \" + noticeType +\n \" and with ignore warnings : \" + ignoreWarnings);\n }\n //todo remove\n //follow use to display serial number in action message ans action errors\n marriage = marriageRegistrationService.getByIdUKey(idUKey, user);\n String[] actionMassageArray = new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : Long.toString(marriage.getSerialOfMaleNotice())};\n try {\n warnings = marriageRegistrationService.\n approveMarriageNotice(idUKey, noticeType, ignoreWarnings, user);\n if (warnings.size() > 0) {\n //if warning size is more than 0 we forward in to approval warning page\n warningsAtApproval = true;\n return \"warning\";\n }\n addActionMessage(getText(\"message.approve.success\", actionMassageArray));\n logger.debug(\"successfully approved marriage notice idUKey : {} and notice type :{ }\", idUKey, noticeType);\n } catch (CRSRuntimeException e) {\n //error happens when approving marriage notice\n switch (e.getErrorCode()) {\n case ErrorCodes.OTHER_PARTY_MUST_APPROVE_FIRST:\n addActionError(getText(\"error.other.party.approve.first\",\n new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n (marriage.getSerialOfMaleNotice() != null) ?\n Long.toString(marriage.getSerialOfMaleNotice()) : getText(\"message.not.yet.add\") :\n (marriage.getSerialOfFemaleNotice() != null) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : getText(\"message.not.yet.add\")}));\n break;\n case ErrorCodes.UNABLE_APPROVE_MARRIAGE_NOTICE_PROHIBITED_RELATIONSHIP:\n addActionError(getText(\"error.approval.failed\", actionMassageArray) + \" , \" + e.getMessage());\n break;\n case ErrorCodes.BRIDES_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.brides.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.GROOMS_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.grooms.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.MORE_THAN_ONE_ACTIVE_LICENSE:\n addActionError(getText(\"error.unable.to.approve.already.issued.license\"));\n break;\n default:\n addActionError(getText(\"error.approval.failed\", actionMassageArray));\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId,\n dsDivisionId, mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return \"failed\";\n } catch (Exception e) {\n logger.debug(\"exception while approving marriage notice :idUKey \");\n return ERROR;\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId, dsDivisionId,\n mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return SUCCESS;\n }",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@OnClick(R.id.mApprovalCommit)\n void onApprovalPress() {\n String userName = mPetitionConcertUserName.getText().toString();\n// if (!userName.equals(\"\")) {\n// userName = userName.substring(1, userName.length() - 1);\n// }\n// String content = mPetitionContent.getText().toString();\n// String petitioner = mPetitioner.getText().toString();\n// String timeRange = mPetitionTimeRange.getText().toString();\n String result = mApprovalResultMenuTab.getText().toString();\n String opinion = mApprovalOpinion.getText().toString();\n if (opinion.equals(\"\")) {\n Toast.makeText(this, \"请输入审批意见\", Toast.LENGTH_SHORT).show();\n } else {\n if (mDialog == null) mDialog = new ProgressDialog(this);\n mDialog.setMessage(\"正在提交,请稍后...\");\n mDialog.setCancelable(false);\n mDialog.show();\n switch (result) {\n case \"同意\":\n mPresent.approvalAgree(approval.getRequestid(), approval.getApproveNodeId(), approval.getApprovePerson(), opinion);\n break;\n case \"不同意\":\n mPresent.approvalRefused(approval.getRequestid(), approval.getApprovePerson(), opinion);\n break;\n default:\n Log.e(TAG, \"onApprovalPress: \" + approval.getRequestid() + \"::\" + approval.getApproveNodeId() + \"::\" + approval.getApprovePerson() + \"::\" + opinion);\n break;\n }\n }\n\n\n }",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"public IBankTransfert payment();",
"@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n transaction.setAction(TransactionAction.VOID);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionVoidRequest(\n transaction.getFundingSource(),\n transaction.getProcessorResponse().getRetrievalRefNum());\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n Log.d(TAG, elavonResponse != null ? elavonResponse.toString() : \"n/a\");\n if (elavonResponse.isSuccess()) {\n Log.i(TAG, \"voidTransaction: \" + transaction.getId() + \" SUCCESS\");\n if (listener != null) {\n convergeMapper.mapTransactionResponse(elavonResponse, transaction);\n try {\n // update the transactionId w/ new void txn Id and set parent\n transaction.setParentId(transaction.getId());\n transaction.setId(UUID.randomUUID());\n listener.onResponse(transaction, requestId, null);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n } else {\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n try {\n // TODO need better error mapping\n PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n t.printStackTrace();\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n // TODO need better error mapping\n final PoyntError error = new PoyntError(PoyntError.CHECK_CARD_FAILURE);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {\n\t\tthis.reciepient = reciepient;\n\t\tthis.msg = msg;\n\t\tthis.parentTransactionId = parentTransactionId;\n\t\tthis.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);\n\t}",
"boolean hasTxnresponse();",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public Action<PaymentState, PaymentEvent> getOverrideCode(){\n\n return ctx -> {\n log.info(\"<<< Override Code service has been called >>>\");\n if(new Random().nextInt(10) < 8){\n log.info(\"Override auth request Approved\");\n log.info(\"<<< Setting event to BAL_OK which should move the state to MAKE_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_OK).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n } else {\n log.info(\"Override auth request Rejected\");\n log.info(\"<<< Setting event to BAL_KO which should move the state to DENY_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_KO).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n }\n\n };\n }",
"@Override\r\n\tpublic ApiResult execute(ApiPayload payload) {\n\t\tlogger.info(\"============>I Publish A Advertisement, Id Is {}\", payload.getAdvertisementId());\r\n\t\treturn new ApiResult(0, \"msg\", \"{ data }\");\r\n\t}",
"public String execute() {\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"void confirmRealWorldTrade(IUserAccount user, ITransaction trans);",
"public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}",
"public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"public String crearActualizarArancel() {\n\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }",
"public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\ttry {\n\t\t\t//1、先创建Session\n\t\t\tSession session=HibernateUtils.getSession();\n\t\t\tsession.beginTransaction();\n\t\t\t//2、执行action\n\t\t\tString result=invocation.invoke();\t//一旦执行到这一句就会打印出sql语句\n\t\t\t\n\t\t\t//4、提交事物\n\t\t\tsession.getTransaction().commit();\t//不需要关闭session\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error\";\n\t\t}\n\t}",
"public Builder setOutput(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {\n if (outputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n output_ = value;\n onChanged();\n } else {\n outputBuilder_.setMessage(value);\n }\n\n return this;\n }"
] |
[
"0.69035065",
"0.67681974",
"0.6326005",
"0.6100993",
"0.59218",
"0.5918723",
"0.5887832",
"0.5747326",
"0.5702259",
"0.5686563",
"0.56655806",
"0.5607208",
"0.5589014",
"0.55882293",
"0.5584644",
"0.5544868",
"0.5522761",
"0.5497064",
"0.5489985",
"0.5489556",
"0.5488435",
"0.5486329",
"0.54668057",
"0.5435078",
"0.54348403",
"0.5434483",
"0.53673166",
"0.536554",
"0.53550684",
"0.53531784",
"0.53065515",
"0.5294754",
"0.52703774",
"0.5245972",
"0.5231797",
"0.52249044",
"0.5224083",
"0.5219865",
"0.5199937",
"0.5195459",
"0.5188493",
"0.51878965",
"0.51698554",
"0.51638967",
"0.5146024",
"0.5127947",
"0.51149684",
"0.51009905",
"0.50868076",
"0.5067921",
"0.50670743",
"0.5065551",
"0.5061288",
"0.5054531",
"0.5035179",
"0.5034696",
"0.503408",
"0.50330794",
"0.503289",
"0.5030934",
"0.5023909",
"0.5020103",
"0.5017427",
"0.5016834",
"0.50132525",
"0.5007529",
"0.49996272",
"0.49937418",
"0.49898052",
"0.4988375",
"0.49846375",
"0.4984028",
"0.49829113",
"0.49758002",
"0.4975393",
"0.49751133",
"0.4968153",
"0.49646065",
"0.49547267",
"0.4953416",
"0.49518037",
"0.49513382",
"0.49414185",
"0.49412546",
"0.49364263",
"0.49341035",
"0.49336392",
"0.49321315",
"0.49309468",
"0.4930023",
"0.49194",
"0.4919026",
"0.49185833",
"0.49155095",
"0.49118617",
"0.4904842",
"0.4902143",
"0.4901887",
"0.4901525",
"0.49005213"
] |
0.5426877
|
26
|
An approve transaction contains one plain output .PlainOutput output = 3;
|
public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {
return getOutput();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove();",
"org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder();",
"org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder();",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (plainApproveBuilder_ == null) {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n } else {\n if (dataCase_ == 4) {\n return plainApproveBuilder_.getMessage();\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApprove getPlainApprove() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"@Suspendable\n @Override\n public Void call() throws FlowException {\n // We retrieve the notary identity from the network map.\n final Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n QueryCriteria queryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, ImmutableList.of(this.linearId),\n Vault.StateStatus.UNCONSUMED, null);\n List<StateAndRef<NDAState>> ndaStates = getServiceHub().getVaultService().queryBy(NDAState.class, queryCriteria).getStates();\n\n // We create the transaction components.\n NDAState outputState = new NDAState(getOurIdentity(), crmParty, \"APPROVED\");\n StateAndContract outputStateAndContract = new StateAndContract(outputState, LEGAL_CONRACT_ID);\n List<PublicKey> requiredSigners = ImmutableList.of(getOurIdentity().getOwningKey(), crmParty.getOwningKey());\n Command cmd = new Command<>(new LegalContract.Approve(), requiredSigners);\n\n // We create a transaction builder and add the components.\n final TransactionBuilder txBuilder = new TransactionBuilder();\n txBuilder.addInputState(ndaStates.get(0));\n txBuilder.setNotary(notary);\n txBuilder.withItems(outputStateAndContract, cmd);\n\n // Signing the transaction.\n final SignedTransaction signedTx = getServiceHub().signInitialTransaction(txBuilder);\n // Creating a session with the other party.\n FlowSession otherpartySession = initiateFlow(crmParty);\n // Obtaining the counterparty's signature.\n SignedTransaction fullySignedTx = subFlow(new CollectSignaturesFlow(\n signedTx, ImmutableList.of(otherpartySession), CollectSignaturesFlow.tracker()));\n // Finalising the transaction.\n subFlow(new FinalityFlow(fullySignedTx));\n return null;\n }",
"public void other_statements_ok(Transaction t) {\n System.out.println(\"about to verify\");\n verify_transaction(t);\n System.out.println(\"verified\");\n make_transaction(t);\n System.out.println(\"success!\");\n }",
"@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"Manager: Leave Approved\");\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput getDelegatedOutput();",
"void finalConfirm(ITransaction trans,boolean confirmation, String userId);",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainApproveOrBuilder getPlainApproveOrBuilder() {\n if ((dataCase_ == 4) && (plainApproveBuilder_ != null)) {\n return plainApproveBuilder_.getMessageOrBuilder();\n } else {\n if (dataCase_ == 4) {\n return (org.hyperledger.fabric.protos.token.Transaction.PlainApprove) data_;\n }\n return org.hyperledger.fabric.protos.token.Transaction.PlainApprove.getDefaultInstance();\n }\n }",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"boolean hasPlainApprove();",
"public Byte getApproveStatus() {\n return approveStatus;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"void confirmTrans(ITransaction trans);",
"TxnResponseProto.TxnResponse getTxnresponse();",
"public boolean hasPlainApprove() {\n return dataCase_ == 4;\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void authorizeTransaction() {}",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }",
"String showPreparedTransactions();",
"@Override\r\n public final void outputTransaction(String receiptOutput) {\r\n JOptionPane.showMessageDialog(null, receiptOutput, EZ, JOptionPane.PLAIN_MESSAGE, icon);\r\n }",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"public Builder setPlainApprove(org.hyperledger.fabric.protos.token.Transaction.PlainApprove value) {\n if (plainApproveBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n data_ = value;\n onChanged();\n } else {\n plainApproveBuilder_.setMessage(value);\n }\n dataCase_ = 4;\n return this;\n }",
"public void base_ok(Transaction t) {\n verify_transaction(t);\n make_transaction(t);\n }",
"public String approveMsg(Long id){\n return messagesParser.approve(id);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutput getOutput() {\n if (outputBuilder_ == null) {\n return output_ == null ? org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n } else {\n return outputBuilder_.getMessage();\n }\n }",
"public void printTransaction() {\n\t\tdao.printTransaction();\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }",
"org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutputOrBuilder getDelegatedOutputOrBuilder();",
"public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}",
"@Override\n\tpublic AutheConfirmPayOutput confirmPay(AutheConfirmPayInput input) {\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(PaymentProtocol.Ack result) {\n log.info(\"Received PaymentAck from merchant. Memo: {}\", result.getMemo());\n getSendBitcoinShowPaymentACKMemoPanelModel().setPaymentACKMemo(result.getMemo());\n\n PaymentProtocolService paymentProtocolService = CoreServices.getPaymentProtocolService();\n\n if (finalPayment != null) {\n Optional<Protos.PaymentACK> paymentACK = paymentProtocolService.newPaymentACK(finalPayment, result.getMemo());\n\n finalPaymentRequestData.setPayment(Optional.of(finalPayment));\n finalPaymentRequestData.setPaymentACK(paymentACK);\n log.debug(\"Saving PaymentMemo of {} and PaymentACKMemo of {}\", finalPayment.getMemo(), paymentACK.isPresent() ? paymentACK.get().getMemo() : \"n/a\");\n WalletService walletService = CoreServices.getOrCreateWalletService(WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletId());\n walletService.addPaymentRequestData(finalPaymentRequestData);\n\n // Write payments\n CharSequence password = WalletManager.INSTANCE.getCurrentWalletSummary().get().getWalletPassword().getPassword();\n if (password != null) {\n walletService.writePayments(password);\n }\n\n CoreEvents.firePaymentSentToRequestorEvent(new PaymentSentToRequestorEvent(true, CoreMessageKey.PAYMENT_SENT_TO_REQUESTER_OK, null));\n } else {\n log.error(\"No payment and hence cannot save payment or paymentACK\");\n }\n }",
"private void reportTransactionStatus(boolean success){\n if(success){\n sendMessage(\"<st>\");\n }else{\n sendMessage(\"<f>\");\n }\n }",
"TransactionResponseType createTransactionResponseType();",
"void setTransactionSuccessful();",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"@Override\n\tpublic String doSth(String xml) {\n\t\tPraseXML praseXML = new PraseXML(xml);\n\t\tMap<String, String> map = praseXML.getInMessageMap();\n\t\tString loanNo=map.get(\"LOAN_NO\");\n\t\t\n\t\tString ddNo=map.get(\"DD_NO\");\n\t\t//System.out.println(loanNo+\"哈哈\"+ddNo);\n\t\tString client=\" \";\n\t\tString lender=\" \";\n\t\tString loanManager=\" \";\n\t\tString loanType=\" \";\n\t\tString loanSubType=\" \";\n\t\tString acctExec=\" \";\n\t\tString ccy=\" \";\n\t\tint ddAmt=0;\n\t\tdouble intRate=0;\n\t\tint loanAmt=0;\n\t\tint drawnAmt=0;\n\t\tString acctNo=\" \";\n\t\tConnection conn = ConnectionPool.getOneConn();\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tcs = conn.prepareCall(\"{call SP_GET_PAY_INFO(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\tcs.setString(1,loanNo);\n\t\t\tcs.setString(2,ddNo);\n\t\t\tcs.registerOutParameter(3,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(4,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(5,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(6,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(7,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(8,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(9,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.registerOutParameter(10,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(11,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(12,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(13,oracle.jdbc.OracleTypes.NUMBER);\n\t\t\tcs.registerOutParameter(14,oracle.jdbc.OracleTypes.VARCHAR);\n\t\t\tcs.execute();\n\t\t\tclient=cs.getString(3);\n\t\t\tlender=cs.getString(4);\n\t\t\tloanManager=\" \";\n\t\t\tloanType=cs.getString(6);\n\t\t\tloanSubType=cs.getString(7);\n\t\t\tacctExec=\" \";\n\t\t\tccy=cs.getString(9);\n\t\t\tddAmt=cs.getInt(10);\n\t\t\tintRate=cs.getDouble(11);\n\t\t\tloanAmt=cs.getInt(12);\n\t\t\tdrawnAmt=cs.getInt(13);\n\t\t\tacctNo=cs.getString(14);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tpraseXML.setBodyMessage(\"CLIENT\",client);\n\t\t\n\t\t//praseXML.setBodyMessage(\"LENDER\",lender);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_MANAGER\", loanManager);\n\t\t\n\t\tpraseXML.setBodyMessage(\"LOAN_TYPE\", loanType);\n\t\n\t\tpraseXML.setBodyMessage(\"LOAN_SUB_TYPE\", loanSubType);\n\t\n\t\tpraseXML.setBodyMessage(\"ACCT_EXEC\", acctExec);\n\t\t\n\t\tpraseXML.setBodyMessage(\"CCY\", ccy);\n\t\t\n\t\tpraseXML.setBodyMessage(\"DD_AMT\", ddAmt+\"\");\n\t\t\n\t\tpraseXML.setBodyMessage(\"INT_RATE\", intRate+\"\");\n\t\tpraseXML.setBodyMessage(\"LOAN_AMT\", loanAmt+\"\");\n\t\tpraseXML.setBodyMessage(\"DRAWN_AMT\", drawnAmt+\"\");\n\t\n\t\treturn praseXML.getRootXml();\n\t}",
"BrainTreeVoidResult voidTransaction(VoidRequest voidRequest);",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public void acceptTransaction(CommandOfService c) throws Exception {\n Session session = Session.getInstance();\n User currentUser = session.getCurrentUser();\n // We pay with the points\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 1){\n // We pay the user helping\n userDAO.removePoints(s.getCost(),currentUser);\n userDAO.addPoints(s.getCost(),u);\n }\n else{\n // We pay the owner of the service\n userDAO.addPoints(s.getCost(),s.getOwner());\n }\n DAO.acceptTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction accepted!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been accepted.\\n\" +\n \"The points have been exchanged\";\n try {\n facadeNotification.createNotification(c.getOwner().getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public double printOutput() {\r\n return calculateNetPay();\r\n }",
"@Override\n\tpublic void doFunction(String[] zInput) throws Exception {\n\t\tMessage msg = getResponseMessage(ConsensusTxn.CONSENSUS_TXNSCRIPT);\n\t\tmsg.addInteger(\"transaction\", Integer.parseInt(zInput[1]));\n\t\tmsg.addString(\"script\", zInput[2]);\n\t\tmsg.addString(\"proof\", zInput[3]);\n\t\t\t\t\n\t\tgetMainHandler().getConsensusHandler().PostMessage(msg);\n\t}",
"public ReversionResponse() {\n\t\tthis.codigoBusqueda = \"\";\n\t\tthis.idTxnNeivorResponse = 0L;\n\t\tthis.idTxnRevertida = 0L;\n\t}",
"org.hyperledger.fabric.protos.token.Transaction.PlainTokenAction getPlainAction();",
"HrDocumentRequest approve(HrDocumentRequest hrDocumentRequest);",
"public boolean processTransaction() {\r\n\t\t\r\n\t\t\tif(verifySignature() == false) {\r\n\t\t\t\tSystem.out.println(\"#Transaction Signature failed to verify\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\ttransactionId = calulateHash();\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public String approveMarriageNotice() {\n if (logger.isDebugEnabled()) {\n logger.debug(\"approving marriage notice idUKey : \" + idUKey + \" and notice type : \" + noticeType +\n \" and with ignore warnings : \" + ignoreWarnings);\n }\n //todo remove\n //follow use to display serial number in action message ans action errors\n marriage = marriageRegistrationService.getByIdUKey(idUKey, user);\n String[] actionMassageArray = new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : Long.toString(marriage.getSerialOfMaleNotice())};\n try {\n warnings = marriageRegistrationService.\n approveMarriageNotice(idUKey, noticeType, ignoreWarnings, user);\n if (warnings.size() > 0) {\n //if warning size is more than 0 we forward in to approval warning page\n warningsAtApproval = true;\n return \"warning\";\n }\n addActionMessage(getText(\"message.approve.success\", actionMassageArray));\n logger.debug(\"successfully approved marriage notice idUKey : {} and notice type :{ }\", idUKey, noticeType);\n } catch (CRSRuntimeException e) {\n //error happens when approving marriage notice\n switch (e.getErrorCode()) {\n case ErrorCodes.OTHER_PARTY_MUST_APPROVE_FIRST:\n addActionError(getText(\"error.other.party.approve.first\",\n new String[]{(noticeType == MarriageNotice.Type.FEMALE_NOTICE) ?\n (marriage.getSerialOfMaleNotice() != null) ?\n Long.toString(marriage.getSerialOfMaleNotice()) : getText(\"message.not.yet.add\") :\n (marriage.getSerialOfFemaleNotice() != null) ?\n Long.toString(marriage.getSerialOfFemaleNotice()) : getText(\"message.not.yet.add\")}));\n break;\n case ErrorCodes.UNABLE_APPROVE_MARRIAGE_NOTICE_PROHIBITED_RELATIONSHIP:\n addActionError(getText(\"error.approval.failed\", actionMassageArray) + \" , \" + e.getMessage());\n break;\n case ErrorCodes.BRIDES_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.brides.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.GROOMS_FATHER_IN_PRS_IS_MISMATCHED_WITH_GIVEN_FATHER:\n addActionError(getText(\"error.given.grooms.father.details.are.mismatched.with.prs\"));\n break;\n case ErrorCodes.MORE_THAN_ONE_ACTIVE_LICENSE:\n addActionError(getText(\"error.unable.to.approve.already.issued.license\"));\n break;\n default:\n addActionError(getText(\"error.approval.failed\", actionMassageArray));\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId,\n dsDivisionId, mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return \"failed\";\n } catch (Exception e) {\n logger.debug(\"exception while approving marriage notice :idUKey \");\n return ERROR;\n }\n commonUtil.populateDynamicLists(districtList, dsDivisionList, mrDivisionList, districtId, dsDivisionId,\n mrDivisionId, AppConstants.MARRIAGE, user, language);\n getApprovalPendingNotices();\n return SUCCESS;\n }",
"public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}",
"@OnClick(R.id.mApprovalCommit)\n void onApprovalPress() {\n String userName = mPetitionConcertUserName.getText().toString();\n// if (!userName.equals(\"\")) {\n// userName = userName.substring(1, userName.length() - 1);\n// }\n// String content = mPetitionContent.getText().toString();\n// String petitioner = mPetitioner.getText().toString();\n// String timeRange = mPetitionTimeRange.getText().toString();\n String result = mApprovalResultMenuTab.getText().toString();\n String opinion = mApprovalOpinion.getText().toString();\n if (opinion.equals(\"\")) {\n Toast.makeText(this, \"请输入审批意见\", Toast.LENGTH_SHORT).show();\n } else {\n if (mDialog == null) mDialog = new ProgressDialog(this);\n mDialog.setMessage(\"正在提交,请稍后...\");\n mDialog.setCancelable(false);\n mDialog.show();\n switch (result) {\n case \"同意\":\n mPresent.approvalAgree(approval.getRequestid(), approval.getApproveNodeId(), approval.getApprovePerson(), opinion);\n break;\n case \"不同意\":\n mPresent.approvalRefused(approval.getRequestid(), approval.getApprovePerson(), opinion);\n break;\n default:\n Log.e(TAG, \"onApprovalPress: \" + approval.getRequestid() + \"::\" + approval.getApproveNodeId() + \"::\" + approval.getApprovePerson() + \"::\" + opinion);\n break;\n }\n }\n\n\n }",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> approve(String spender, BigInteger value) {\n final Function function = new Function(\n FUNC_APPROVE,\n Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(spender),\n new org.web3j.abi.datatypes.generated.Uint256(value)),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"public IBankTransfert payment();",
"@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public int execute() throws InterruptedOperationException, CancelOperationException {\n Logger logger = Log4j.getLogger();\n int success = 0;\n try {\n String accountNumber = null;\n BigDecimal amount = BigDecimal.ONE;\n Transaction transaction;\n LocalDateTime now;\n String userId = BankApp.getCurrentUser().getUserId();\n List<String> accountNumbers = accountDao.getAccountNumbers(userId);\n ConsoleHelper.println(\"\");\n ConsoleHelper.displayMenuBanner();\n ConsoleHelper.printlnWithTab(\"[DEPOSIT]\");\n ConsoleHelper.printAccountList();\n\n boolean isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Into: \");\n String input = ConsoleHelper.readString();\n for (int i = 1; i <= accountNumbers.size(); i++) {\n if (input.equals(String.valueOf(i))) {\n accountNumber = accountNumbers.get(i - 1);\n isValidInput = true;\n break;\n }\n }\n\n } while (!isValidInput);\n\n isValidInput = false;\n do {\n ConsoleHelper.printWithTab(\"Amount: \");\n String input = ConsoleHelper.readString();\n try {\n double inputValue = Double.parseDouble(input);\n amount = BigDecimal.valueOf(inputValue);\n int decimalPlaces = ConsoleHelper.getNumberOfDecimalPlaces(amount);\n if (decimalPlaces == 0 && amount.compareTo(BigDecimal.valueOf(0)) > 0) {\n isValidInput = true;\n } else {\n ConsoleHelper.printlnWithTab(\"Invalid amount, we only accept whole number deposit.\");\n }\n } catch (NumberFormatException e) {\n // the amount format is not valid\n }\n } while (!isValidInput);\n\n int countAccount = accountDao.deposit(accountNumber, amount);\n now = LocalDateTime.now();\n Account account = accountDao.getAccount(accountNumber);\n transaction = new Transaction(TransactionType.DEPOSIT, userId, now, amount, account);\n int countTransaction = transactionDao.addTransaction(transaction);\n success = countAccount == 1 && countTransaction == 1 ? 1 : 0;\n if (success == 1) {\n ConsoleHelper.printlnWithTab(\"Deposit completed.\");\n ConsoleHelper.println(\"\");\n } else {\n ConsoleHelper.printlnWithTab(\"System failure, deposit cancelled. Please try later.\");\n }\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n logger.error(\"Interrupted Exception when thread sleep\", e);\n }\n } catch (CancelOperationException e) {\n // do nothing, allow user to return to main menu\n }\n return success;\n }",
"@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n transaction.setAction(TransactionAction.VOID);\n\n final ElavonTransactionRequest request = convergeMapper.getTransactionVoidRequest(\n transaction.getFundingSource(),\n transaction.getProcessorResponse().getRetrievalRefNum());\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n Log.d(TAG, elavonResponse != null ? elavonResponse.toString() : \"n/a\");\n if (elavonResponse.isSuccess()) {\n Log.i(TAG, \"voidTransaction: \" + transaction.getId() + \" SUCCESS\");\n if (listener != null) {\n convergeMapper.mapTransactionResponse(elavonResponse, transaction);\n try {\n // update the transactionId w/ new void txn Id and set parent\n transaction.setParentId(transaction.getId());\n transaction.setId(UUID.randomUUID());\n listener.onResponse(transaction, requestId, null);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n } else {\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n try {\n // TODO need better error mapping\n PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n t.printStackTrace();\n Log.e(TAG, \"voidTransaction: \" + transaction.getId() + \" FAILED\");\n if (listener != null) {\n // TODO need better error mapping\n final PoyntError error = new PoyntError(PoyntError.CHECK_CARD_FAILURE);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"public org.hyperledger.fabric.protos.token.Transaction.PlainOutputOrBuilder getOutputOrBuilder() {\n if (outputBuilder_ != null) {\n return outputBuilder_.getMessageOrBuilder();\n } else {\n return output_ == null ?\n org.hyperledger.fabric.protos.token.Transaction.PlainOutput.getDefaultInstance() : output_;\n }\n }",
"@Test(dependsOnMethods = \"testCreate\")\n\tpublic void testApprove() throws Exception{\n\t\tString url = getProperty(BT_REST_URL)+BOOSTBLOCK_APPROVE+\"/\";\n\t\tlog.info(\"approve boostandblock resturi = \"+url);\n\t\tfor (Integer boostBlockId : getBoostAndBlocksMap().keySet()) {\n\t\t\tHttpEntity<Integer> entity = new HttpEntity<Integer>(getHeaders());\n\t\t\tResponseEntity<String> response = getRestTemplate().exchange(url+boostBlockId, HttpMethod.PUT, entity, String.class);\n\t\t\tassertNotNull(response);\n\t\t\tString boostResponseString = response.getBody();\n\t\t\tlog.info(\"approve boost response = \"+boostResponseString);\n\t\t\tJSONObject boostResponse = new JSONObject(boostResponseString);\n\t\t\tassertTrue(boostResponse.has(\"data\"));\n\t\t\tJSONObject data = (JSONObject)boostResponse.get(\"data\");\n\t\t\tassertTrue(data.has(\"status\"));\n\t\t\tString status = (String)data.get(\"status\");\n\t\t\tlog.info(\"approve boost status = \"+boostBlockId+\" status = \"+status);\n\t\t\tassertNotNull(status);\n\t\t\tassertEquals(status,\"Approved\");\n\t\t}\n\t}",
"private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isApproved()\n\t{\n\t\tif(response.containsKey(\"Result\")) {\n\t\t\tif(response.get(\"Result\").equals(\"APPROVED\")) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private PlainApprove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"@Override\n public void doExecute(ProcessBundle bundle) throws Exception {\n\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n final String unifiedProposalId = (String) bundle.getParams().get(\"Escm_Proposalmgmt_ID\")\n .toString();\n EscmProposalMgmt unifiedProposal = OBDal.getInstance().get(EscmProposalMgmt.class,\n unifiedProposalId);\n\n final String clientId = (String) bundle.getContext().getClient();\n String userId = (String) bundle.getContext().getUser();\n String tabId = (String) bundle.getParams().get(\"tabId\");\n String roleId = (String) bundle.getContext().getRole();\n String orgId = unifiedProposal.getOrganization().getId();\n\n String histStatus = \"\", comments = (String) bundle.getParams().get(\"comments\").toString();\n boolean errorFlag = false, headerUpdate = false;\n String DocStatus = unifiedProposal.getProposalappstatus();\n\n if (DocStatus.equals(\"INC\")) {\n OBDal.getInstance().rollbackAndClose();\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_AlreadyPreocessed_Approved@\");\n bundle.setResult(result);\n return;\n }\n\n // OBError error = UnifiedProposalReactivateMethods\n // .proposalReactivateValidation(unifiedProposalId, clientId, orgId, userId, roleId, tabId);\n // if (error.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n // bundle.setResult(error);\n // return;\n // }\n\n Connection con = OBDal.getInstance().getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String query = null;\n List<String> proposalList = new ArrayList<String>();\n\n try {\n\n query = \" select escm_proposalmgmt_id from escm_proposalmgmt_line \"\n + \" where escm_proposalmgmt_line_id in (select escm_unifiedproposalines_v_id \"\n + \" from escm_unifiedproposalines_v where escm_proposalmgmt_id = ?) \"\n + \" group by escm_proposalmgmt_id \";\n\n ps = con.prepareStatement(query);\n ps.setString(1, unifiedProposalId);\n\n rs = ps.executeQuery();\n\n // Get proposal id list\n while (rs.next()) {\n proposalList.add(rs.getString(\"escm_proposalmgmt_id\"));\n }\n\n // Reactivate validation\n // Check PO is created for awarded proposals\n boolean hasError = false;\n String proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalReactivateMethods.proposalReactivateValidation(proposalId,\n clientId, proposal.getOrganization().getId(), userId, roleId, tabId);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Escm_Proposalhasorder@\");\n bundle.setResult(result);\n return;\n }\n\n // Update line info if any error occurs\n hasError = false;\n proposalMessage = OBMessageUtils.messageBD(\"Escm_proposalcommon\").replace(\"%\", \"\");\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.encumbranceValidationReject(proposal, vars);\n if (error1.getType().equals(\"error\")) {\n // OBDal.getInstance().rollbackAndClose();\n hasError = true;\n proposalMessage = proposalMessage + proposal.getProposalno() + \", \";\n }\n }\n if (hasError) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", proposalMessage,\n \"@Efin_Encum_Used_Cannot_Rej@\");\n bundle.setResult(result);\n return;\n }\n\n // Skip new version (todo)\n // Check bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, true, proposalList);\n if (error1.getType().equals(\"error\")) {\n bundle.setResult(error1);\n return;\n }\n }\n\n // If no error occurs, do encumbrance changes\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposal = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n OBError error1 = UnifiedProposalRejectMethods.updateProposalEncumbranceReject(proposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n // update bid encumbrance for unified proposal\n if (unifiedProposal.getEscmBidmgmt() != null\n && unifiedProposal.getEscmBidmgmt().getEncumbrance() != null) {\n\n boolean isFullyAwarded = UnifiedProposalActionMethod.isProposalFullyAwarded(proposalList);\n if (isFullyAwarded) {\n\n OBError error1 = UnifiedProposalRejectMethods.changeEncumStageRej(unifiedProposal,\n vars);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n\n } else {\n // reactivate split encumbrance\n for (String proposalId : proposalList) {\n EscmProposalMgmt proposalMgmt = OBDal.getInstance().get(EscmProposalMgmt.class,\n proposalId);\n UnifiedProposalRejectMethods.reactivateSplitBid(proposalMgmt, false, proposalList);\n }\n\n OBError error1 = UnifiedProposalRejectMethods\n .getUnifiedProposaltoBidDetailsRej(unifiedProposal, vars, false, proposalList);\n if (error1.getType().equals(\"error\")) {\n OBDal.getInstance().rollbackAndClose();\n bundle.setResult(error1);\n return;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // log.error(\"Exception in isDirectApproval \" + e.getMessage());\n } finally {\n // close db connection\n try {\n if (rs != null)\n rs.close();\n if (ps != null)\n ps.close();\n } catch (Exception e) {\n }\n }\n\n // update proposal Management header status based on reject\n if (!errorFlag) {\n\n headerUpdate = UnifiedProposalReactivateMethods\n .updateUnifiedProposalReactivate(unifiedProposal);\n\n if (headerUpdate) {\n OBDal.getInstance().save(unifiedProposal);\n\n // insert the Action history\n if (!StringUtils.isEmpty(unifiedProposalId)) {\n JSONObject historyData = new JSONObject();\n histStatus = \"REA\";// Reactivate\n historyData.put(\"ClientId\", clientId);\n historyData.put(\"OrgId\", orgId);\n historyData.put(\"RoleId\", roleId);\n historyData.put(\"UserId\", userId);\n historyData.put(\"HeaderId\", unifiedProposalId);\n historyData.put(\"Comments\", comments);\n historyData.put(\"Status\", histStatus);\n historyData.put(\"NextApprover\", \"\");\n historyData.put(\"HistoryTable\", ApprovalTables.Proposal_Management_History);\n historyData.put(\"HeaderColumn\",\n ApprovalTables.Proposal_Management_History_HEADER_COLUMN);\n historyData.put(\"ActionColumn\",\n ApprovalTables.Proposal_Management_History_DOCACTION_COLUMN);\n\n UnifiedProposalActionMethod.InsertApprovalHistory(historyData);\n }\n\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT);\n // delete the unused nextroles in eut_next_role table.\n DocumentRuleDAO.deleteUnusedNextRoles(OBDal.getInstance().getConnection(),\n Resource.PROPOSAL_MANAGEMENT_DIRECT);\n\n }\n }\n\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", \"@Escm_Ir_complete_success@\");\n bundle.setResult(result);\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n OBDal.getInstance().rollbackAndClose();\n log.debug(\"Exeception in UnifiedProposalReactivate:\" + e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"public TransactionOutput(PublicKey reciepient, String msg, String parentTransactionId) {\n\t\tthis.reciepient = reciepient;\n\t\tthis.msg = msg;\n\t\tthis.parentTransactionId = parentTransactionId;\n\t\tthis.id = StringUtil.applySha256(StringUtil.getStringFromKey(reciepient)+msg+parentTransactionId);\n\t}",
"boolean hasTxnresponse();",
"public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }",
"@Override\n public int cancelTransaction() {\n System.out.println(\"Please make a selection first\");\n return 0;\n }",
"public void onOutputSpent(MoneroOutputWallet output);",
"public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}",
"public Action<PaymentState, PaymentEvent> getOverrideCode(){\n\n return ctx -> {\n log.info(\"<<< Override Code service has been called >>>\");\n if(new Random().nextInt(10) < 8){\n log.info(\"Override auth request Approved\");\n log.info(\"<<< Setting event to BAL_OK which should move the state to MAKE_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_OK).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n } else {\n log.info(\"Override auth request Rejected\");\n log.info(\"<<< Setting event to BAL_KO which should move the state to DENY_PAYMENT>>>\");\n ctx.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.OVERDRAFT_KO).setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, ctx.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER)).build());\n }\n\n };\n }",
"@Override\r\n\tpublic ApiResult execute(ApiPayload payload) {\n\t\tlogger.info(\"============>I Publish A Advertisement, Id Is {}\", payload.getAdvertisementId());\r\n\t\treturn new ApiResult(0, \"msg\", \"{ data }\");\r\n\t}",
"public String execute() {\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@Override\n public String execute() throws Exception {\n\treturn SUCCESS;\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"void confirmRealWorldTrade(IUserAccount user, ITransaction trans);",
"public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}",
"public void printTransactions() {\n for (int i = 0; i < transactions.size(); i++) {\n\t\t\tint indeks = i+1;\n\t\t\tSystem.out.println(\"Transactions \" + indeks + \": \" + transactions.get(i).getType() + \" \" + transactions.get(i).getAmount());\n\t\t}\n }",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"public String crearActualizarArancel() {\n\n\t\treturn SUCCESS;\n\t}",
"@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }",
"public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }",
"public void returnAct() {\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.returnTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\ttry {\n\t\t\t//1、先创建Session\n\t\t\tSession session=HibernateUtils.getSession();\n\t\t\tsession.beginTransaction();\n\t\t\t//2、执行action\n\t\t\tString result=invocation.invoke();\t//一旦执行到这一句就会打印出sql语句\n\t\t\t\n\t\t\t//4、提交事物\n\t\t\tsession.getTransaction().commit();\t//不需要关闭session\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error\";\n\t\t}\n\t}",
"public Builder setOutput(org.hyperledger.fabric.protos.token.Transaction.PlainOutput value) {\n if (outputBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n output_ = value;\n onChanged();\n } else {\n outputBuilder_.setMessage(value);\n }\n\n return this;\n }"
] |
[
"0.69035065",
"0.67681974",
"0.6326005",
"0.6100993",
"0.59218",
"0.5918723",
"0.5887832",
"0.5747326",
"0.5702259",
"0.5686563",
"0.56655806",
"0.5607208",
"0.5589014",
"0.55882293",
"0.5584644",
"0.5544868",
"0.5522761",
"0.5497064",
"0.5489985",
"0.5489556",
"0.5488435",
"0.5486329",
"0.54668057",
"0.5435078",
"0.54348403",
"0.5434483",
"0.5426877",
"0.53673166",
"0.536554",
"0.53550684",
"0.53531784",
"0.53065515",
"0.5294754",
"0.52703774",
"0.5245972",
"0.5231797",
"0.52249044",
"0.5224083",
"0.5219865",
"0.5199937",
"0.5195459",
"0.5188493",
"0.51878965",
"0.51638967",
"0.5146024",
"0.5127947",
"0.51149684",
"0.51009905",
"0.50868076",
"0.5067921",
"0.50670743",
"0.5065551",
"0.5061288",
"0.5054531",
"0.5035179",
"0.5034696",
"0.503408",
"0.50330794",
"0.503289",
"0.5030934",
"0.5023909",
"0.5020103",
"0.5017427",
"0.5016834",
"0.50132525",
"0.5007529",
"0.49996272",
"0.49937418",
"0.49898052",
"0.4988375",
"0.49846375",
"0.4984028",
"0.49829113",
"0.49758002",
"0.4975393",
"0.49751133",
"0.4968153",
"0.49646065",
"0.49547267",
"0.4953416",
"0.49518037",
"0.49513382",
"0.49414185",
"0.49412546",
"0.49364263",
"0.49341035",
"0.49336392",
"0.49321315",
"0.49309468",
"0.4930023",
"0.49194",
"0.4919026",
"0.49185833",
"0.49155095",
"0.49118617",
"0.4904842",
"0.4902143",
"0.4901887",
"0.4901525",
"0.49005213"
] |
0.51698554
|
43
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {
if (inputsBuilder_ == null) {
return java.util.Collections.unmodifiableList(inputs_);
} else {
return inputsBuilder_.getMessageList();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384397",
"0.6384397",
"0.6384397",
"0.62441504",
"0.600467",
"0.600467",
"0.600467",
"0.5734758",
"0.5686811",
"0.5686811",
"0.5686811",
"0.56617343",
"0.56617343",
"0.56617343",
"0.5657541",
"0.5657541",
"0.5657541",
"0.56565136",
"0.56565136",
"0.56565136",
"0.55340517",
"0.54597545",
"0.54597545",
"0.54597545",
"0.5406362",
"0.5406362",
"0.5406362",
"0.5397859",
"0.5359839",
"0.5359839",
"0.5359839",
"0.5355124",
"0.5355124",
"0.5355124",
"0.5242225",
"0.51780444",
"0.5176851",
"0.5163166",
"0.5154936",
"0.51534355",
"0.5134134",
"0.51290333",
"0.5079506",
"0.50576276",
"0.5047629",
"0.5041241",
"0.50355875",
"0.5028329",
"0.5027488",
"0.50193053",
"0.5015189",
"0.50145113",
"0.50145113",
"0.50145113",
"0.50107074",
"0.5003522",
"0.49968827",
"0.49832097",
"0.49832097",
"0.49832097",
"0.49820295",
"0.49820295",
"0.49820295",
"0.49747488",
"0.49635074",
"0.49571964",
"0.49504423",
"0.49491665",
"0.4944884",
"0.49423066",
"0.49257764",
"0.49203715",
"0.4919951",
"0.4903786",
"0.48779002",
"0.48617092",
"0.48582584",
"0.48567244",
"0.4846232",
"0.48380193",
"0.48355147",
"0.48317638",
"0.48088267",
"0.48086536",
"0.48076493",
"0.48011008",
"0.4800445",
"0.4797408",
"0.47955093",
"0.47955093",
"0.47955093",
"0.47909656",
"0.47902578",
"0.47877374",
"0.47856382",
"0.47782156",
"0.47615787",
"0.47585836"
] |
0.48500854
|
79
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public int getInputsCount() {
if (inputsBuilder_ == null) {
return inputs_.size();
} else {
return inputsBuilder_.getCount();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.6384342",
"0.6384342",
"0.6384342",
"0.62442476",
"0.60049874",
"0.60049874",
"0.60049874",
"0.5734742",
"0.5686556",
"0.5686556",
"0.5686556",
"0.56619465",
"0.56619465",
"0.56619465",
"0.5657256",
"0.5657256",
"0.5657256",
"0.56567615",
"0.56567615",
"0.56567615",
"0.5532894",
"0.5460337",
"0.5460337",
"0.5460337",
"0.54063994",
"0.54063994",
"0.54063994",
"0.5397599",
"0.5359404",
"0.5359404",
"0.5359404",
"0.5355254",
"0.5355254",
"0.5355254",
"0.5241932",
"0.5177201",
"0.51761574",
"0.5163442",
"0.51542014",
"0.51533276",
"0.51342094",
"0.5128805",
"0.50801396",
"0.5057121",
"0.50467116",
"0.5040282",
"0.50347435",
"0.5028324",
"0.5027452",
"0.5020486",
"0.5015467",
"0.5013651",
"0.5013651",
"0.5013651",
"0.50094783",
"0.5001964",
"0.49959955",
"0.49826318",
"0.49826318",
"0.49826318",
"0.49824396",
"0.49824396",
"0.49824396",
"0.49742383",
"0.49636057",
"0.49569297",
"0.49496442",
"0.4949405",
"0.49451053",
"0.49415642",
"0.4924856",
"0.49200407",
"0.49192843",
"0.49040863",
"0.48779726",
"0.4863212",
"0.48584422",
"0.4856546",
"0.48500824",
"0.48500824",
"0.48500824",
"0.48454377",
"0.48380008",
"0.48359668",
"0.48325002",
"0.4809187",
"0.48078918",
"0.48066288",
"0.4801499",
"0.47998822",
"0.4797701",
"0.4794415",
"0.4794415",
"0.4794415",
"0.47908023",
"0.47901642",
"0.4788092",
"0.4785302",
"0.47787458",
"0.47613403",
"0.47583917"
] |
0.0
|
-1
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {
if (inputsBuilder_ == null) {
return inputs_.get(index);
} else {
return inputsBuilder_.getMessage(index);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public Builder setInputs(\n int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.set(index, value);\n onChanged();\n } else {\n inputsBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.4983671",
"0.4983671",
"0.4983671",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.56564087
|
19
|
The inputs to the transfer transaction are specified by their ID repeated .InputId inputs = 1;
|
public Builder setInputs(
int index, org.hyperledger.fabric.protos.token.Transaction.InputId value) {
if (inputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputsIsMutable();
inputs_.set(index, value);
onChanged();
} else {
inputsBuilder_.setMessage(index, value);
}
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index);",
"private ArrayList<Long> storeTransactionInputs(long transactionId, ArrayList<TransactionInput> inputs, int isCoinbase){\n \t\tint inputindex = 0;\n \t\tlong previousOutputId;\n \t\tString prevOutputHash;\n \t\tResultSet findOutputResults;\n \t\tResultSet generatedKey;\n \t\tLong addressId;\n \t\tArrayList<Long> addressIdz=new ArrayList<Long>();\n \t\ttry {\n \t\tfor (TransactionInput i : inputs) {\n\t\t\t\n \t\t\tprevOutputHash = HexBin.encode(i.outpoint.hash);\n \t\t\tfindTransactionOutputStatement.setString(1, prevOutputHash);\n \t\t\tfindTransactionOutputStatement.setLong(2, i.outpoint.index);\n \t\t\tfindOutputResults = findTransactionOutputStatement\n \t\t\t\t\t.executeQuery();\n \t\t\tif (findOutputResults.next()) {\n \t\t\t\tpreviousOutputId = findOutputResults.getLong(1);\n\t\t\t\taddressId=findOutputResults.getLong(2);\n \t\t\t} else {\n \t\t\t\tpreviousOutputId = 0;\n\t\t\t\taddressId=null;\n \t\t\t}\n \t\t\tfindOutputResults.close();\n \t\t\tinsertTransactionInputStatement.setLong(1, transactionId);\n \t\t\tinsertTransactionInputStatement.setInt(2, inputindex);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(3, previousOutputId);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setString(4, prevOutputHash);\n \t\t\tinsertTransactionInputStatement\n \t\t\t\t\t.setLong(5, i.outpoint.index);\n \t\t\tinsertTransactionInputStatement.setLong(6,\n \t\t\t\t\ti.scriptBytes.length);\n \t\t\tinsertTransactionInputStatement.setString(7,\n \t\t\t\t\tHexBin.encode(i.scriptBytes));\n \t\t\tinsertTransactionInputStatement.setLong(8, i.sequence);\n \t\t\tinsertTransactionInputStatement.setBoolean(9,\n \t\t\t\t\ti.isCoinBase());\n\t\t\tif(addressId!=null){\n \t\t\t\tinsertTransactionInputStatement.setLong(10,addressId);\n \t\t\t\taddressIdz.add(addressId);\n\t\t\t} else {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\tinsertTransactionInputStatement.setNull(10,\n \t\t\t\t\t\tjava.sql.Types.INTEGER);\n \t\t\t}\n \t\t\tinsertTransactionInputStatement.execute();\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t} catch (SQLException e1) {\n \t\t// TODO Auto-generated catch block\n \t\te1.printStackTrace();\n \t}\n \t\treturn addressIdz;\n \t}",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index);",
"void setInputs(List<ContractIOType> inputs) {\n this.inputs = inputs;\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n return inputs_.get(index);\n }",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> \n getInputsList();",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId getInputs(int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index);\n } else {\n return inputsBuilder_.getMessage(index);\n }\n }",
"public void setidInput(int idi) {\r\n idInput = idi;\r\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder getInputsOrBuilder(\n int index) {\n if (inputsBuilder_ == null) {\n return inputs_.get(index); } else {\n return inputsBuilder_.getMessageOrBuilder(index);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n return inputs_;\n }",
"private void saveInputs(int[] inputs, int[] outputs){\n\t\tthis.inputs.add(inputs);\n\t\tthis.outputs.add(outputs);\n\t}",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n return inputs_;\n }",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList();",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n public byte[] createDataToSignInput(\n Transaction transaction,\n int inputIndex,\n long amountInSat,\n PublicKeyTriple publicKeyTriple) {\n\n final byte[] redeemScript = createRedeemScript(publicKeyTriple);\n\n return TransactionHelpers.getDataToSign(\n transaction,\n inputIndex,\n new Script(redeemScript)\n );\n }",
"@Test\n public void TxHandlerTestThird() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid output number(wrong number of coins to transfer)\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx 1 scrooge to alice 20coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: Alice --> Bob -5coins [*Invalid output number*]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(-5, pkBob.getPublic());\n tx2.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n // tx3: Alice --> Bob 90coins [*Invalid output number*]\n Transaction tx3 = new Transaction();\n tx3.addInput(tx1.getHash(), 0);\n tx3.addOutput(90, pkBob.getPublic());\n tx3.signTx(pkAlice.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx3) returns: \" + txHandler.isValidTx(tx3));\n assertTrue(\"tx3:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx3}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx3:one UTXO's remained\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n// System.out.println(\"tx3.hashCode returns: \" + tx3.hashCode());\n }",
"@Test\n public void testHandleTxs() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n // Cal transfers 5 coins to Bob, Bob transfers 2 coins to Alice\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0); // index 0 refers to output 1 of tx1\n tx2.addInput(tx1.getHash(), 1); // index 1 refers to output 1 of tx1\n tx2.addOutput(2, kpAlice.getPublic());\n tx2.addOutput(5, kpBob.getPublic());\n\n // Sign for tx2\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx2.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(0).addSignature(sig2);\n\n byte[] sig3 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpCal.getPrivate());\n sig.update(tx2.getRawDataToSign(1));\n sig3 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx2.getInput(1).addSignature(sig3);\n tx2.finalize();\n\n // Alice transfers 3 coins to Cal\n Transaction tx3 = new Transaction();\n tx3.addInput(tx2.getHash(), 0);\n tx3.addOutput(3, kpCal.getPublic());\n\n // Sign for tx3\n byte[] sig4 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx3.getRawDataToSign(0));\n sig4 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx3.getInput(0).addSignature(sig4);\n tx3.finalize();\n\n Transaction[] acceptedTx = txHandler.handleTxs(new Transaction[] {tx1, tx2, tx3});\n // tx1, tx2 supposed to be valid, tx3 supposed to be invalid\n assertEquals(acceptedTx.length, 2);\n // assertFalse(txHandler.isValidTx(tx3));\n }",
"Input getInputs();",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"@Override\r\n\tpublic int inputMstTransaction(MstTransactionTypeDto dto) {\n\t\ttry {\r\n\t\tfinal int result = transactionRepo.inputMstTransaction(dto.getCompanyCode(), dto.getTrxCode(), dto.getTrxName(), dto.getModuleName(), dto.getTrxType(), dto.getPrefix(), dto.getScale(), dto.getFlagActive(), dto.getCreatedBy());\r\n\t\tif(result ==1) {\r\n\t\t\treturn ConsVar.REST_STATUS_OK;\r\n\t\t}else {\r\n\t\t\treturn ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tSystem.out.println(\"e \" +e.getMessage());\r\n\t\t return ConsVar.REST_STATUS_ERROR;\r\n\t\t}\r\n\t\t\r\n\t}",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType addNewInput();",
"public void setInput( float inputs[] ) {\n\t\t// Put input assignment code here\n }",
"@Test\n public void testValidOutputValues() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, -20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(-20, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"@java.lang.Override\n public boolean hasInputIds() {\n return inputSourceCase_ == 2;\n }",
"public static void main(String[] args) {\n\n V2Grpc.V2BlockingStub stub = V2Grpc.newBlockingStub(ClarifaiChannel.INSTANCE.getGrpcChannel())\n .withCallCredentials(new ClarifaiCallCredentials(PAT));\n\n // To start from beginning, do not provide the last ID parameter.\n MultiInputResponse firstStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setPerPage(10)\n .build()\n );\n\n if (firstStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + firstStreamInputsResponse.getStatus());\n }\n\n System.out.println(\"First response (starting from the first input):\");\n List < Input > inputs = firstStreamInputsResponse.getInputsList();\n for (Input input: inputs) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n String lastId = inputs.get(inputs.size() - 1).getId();\n\n // Set last ID to get the next set of inputs. The returned inputs will not include the last ID input.\n MultiInputResponse secondStreamInputsResponse = stub.streamInputs(\n StreamInputsRequest.newBuilder()\n .setUserAppId(UserAppIDSet.newBuilder().setUserId(USER_ID).setAppId(APP_ID))\n .setLastId(lastId)\n .setPerPage(10)\n .build()\n );\n\n if (secondStreamInputsResponse.getStatus().getCode() != StatusCode.SUCCESS) {\n throw new RuntimeException(\"Stream inputs failed, status: \" + secondStreamInputsResponse.getStatus());\n }\n\n System.out.println(String.format(\"Second response (first input is the one following input ID %s)\", lastId));\n for (Input input: secondStreamInputsResponse.getInputsList()) {\n System.out.println(\"\\t\" + input.getId());\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"public org.hyperledger.fabric.protos.token.Transaction.InputId.Builder addInputsBuilder() {\n return getInputsFieldBuilder().addBuilder(\n org.hyperledger.fabric.protos.token.Transaction.InputId.getDefaultInstance());\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputType getInput();",
"public void setInput1(int input1) {\n this.input1 = input1;\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"public java.util.List<? extends org.hyperledger.fabric.protos.token.Transaction.InputIdOrBuilder> \n getInputsOrBuilderList() {\n if (inputsBuilder_ != null) {\n return inputsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(inputs_);\n }\n }",
"boolean transfer(UUID from, UUID to, double amount);",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDs getInputIds() {\n if (inputIdsBuilder_ == null) {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 2) {\n return inputIdsBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"public void calculateInputs()\n {\n numberOfInputs = inputs.size();\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public float getInputsValue() {\n\n float total = 0;\n for (TransactionInput i : inputs) {\n // If the transaction can't be found, skip it.\n if (i.UTXO == null) continue;\n total += i.UTXO.value;\n }\n return total;\n }",
"public ReleasesAndTransfers(String inputValue) {\n super(inputValue);\n this.inputValue = inputValue;\n }",
"public float getInputsValue() {\n\t\tfloat total = 0;\n\t\tfor (TransactionInput i : inputs) {\n\t\t\tif (i.getUTXO() == null)\n\t\t\t\tcontinue; // if Transaction can't be found skip it\n\t\t\ttotal += i.getUTXO().getValue();\n\t\t}\n\t\treturn total;\n\t}",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"void generateSameTX(String name, List<String> types, Settings settings);",
"Inputs getInputs();",
"private void rewardTransaction (PublicKey recipient, ArrayList<Transfer> transfers) {\n int rewardTransferId = 0;\n if (!transfers.isEmpty()) {\n Transfer latestTransfer = this.transfers.get(this.transfers.size() - 1);\n rewardTransferId = latestTransfer.transferId + 1;\n }\n\n transfers.add(new Transfer(100, recipient, rewardTransferId));\n }",
"public Transfer(Account from, int[] amounts, Account to) {\n this.from = from;\n this.amounts = amounts;\n this.to = to;\n }",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"void addInvitedTrans(ITransaction transaction, String userId);",
"public List<ContractIOType> getInputs() {\n return inputs;\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public java.util.List<org.hyperledger.fabric.protos.token.Transaction.InputId> getInputsList() {\n if (inputsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(inputs_);\n } else {\n return inputsBuilder_.getMessageList();\n }\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"@Suspendable\n @Override\n public SignedTransaction call() throws FlowException {\n\n Party notary = getServiceHub().getNetworkMapCache().getNotaryIdentities().get(0);\n//\n\n // Source\n AccountInfo issuerOwner = subFlow(new AccountInfoByName(acctNameSource)).get(0).getState().getData();\n PublicKey issuerOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty issuerOwnerAnonParty = new AnonymousParty(issuerOwnerKey);\n\n AccountInfo targetOwner = subFlow(new AccountInfoByName(acctNameTarget)).get(0).getState().getData();\n PublicKey targetOwnerKey = getServiceHub().getKeyManagementService().freshKey(issuerOwner.getIdentifier().getId());\n AnonymousParty targetOwnerAnonParty = new AnonymousParty(targetOwnerKey);\n\n\n AssetForAccountState outputAsset = new AssetForAccountState(issuerOwnerAnonParty, targetOwnerAnonParty,\n asset.getState().getData().getName(), asset.getState().getData().getValue());\n\n\n TransactionBuilder txBuilder = new TransactionBuilder(notary)\n .addInputState(asset)\n .addOutputState(outputAsset, AssetForAccountContract.ID)\n .addCommand(new AssetForAccountContract.Commands.Transfer(), issuerOwnerKey);\n\n txBuilder.verify(getServiceHub());\n\n SignedTransaction fullySignedTransaction = getServiceHub().signInitialTransaction(txBuilder, issuerOwnerKey);\n\n //return fullySignedTransaction;\n return subFlow(new FinalityFlow(fullySignedTransaction, Collections.emptyList()));\n }",
"com.indosat.eai.catalist.standardInputOutput.RequestType getRequest();",
"com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();",
"public Long getTransferId() {\n return transferId;\n }",
"InputsType getInputs();",
"public int getInput1() {\n return input1;\n }",
"private void addTransaction()throws IOException{\n System.out.println(\"New client? \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n String opt = bufferRead.readLine();\n Client c = new Client();\n if(opt.equals(\"yes\")){\n c = this.readClient();\n this.ctrl.addClient(c);\n }\n else {\n this.printAllClients();\n int clientOption = Integer.parseInt(bufferRead.readLine());\n c = (Client) this.ctrl.getAllClients().toArray()[clientOption - 1];\n }\n System.out.println(\"Enter the date(dd/mm/yyyy): \");\n String date = bufferRead.readLine();\n Transaction t = new Transaction(c, date);\n\n System.out.println(\"Choose an item: \");\n this.printAllItems();\n String sOption = bufferRead.readLine();\n\n while(!(sOption.equals(\"stop\"))) {\n\n int option = 0;\n\n option = Integer.parseInt(sOption);\n ClothingItem item = (ClothingItem) this.ctrl.getAllItems().toArray()[option - 1];\n t.addItemToCart(item);\n\n this.printAllItems();\n System.out.println(\"Enter another option: \");\n sOption = bufferRead.readLine();\n }\n System.out.println(\"Enter a transaction id: \");\n Long id = Long.parseLong(bufferRead.readLine());\n t.setId(id);\n this.ctrl.addTransaction(t);\n }",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public Long getTransferId() {\n return transferId;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Builder addInputs(org.hyperledger.fabric.protos.token.Transaction.InputId value) {\n if (inputsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureInputsIsMutable();\n inputs_.add(value);\n onChanged();\n } else {\n inputsBuilder_.addMessage(value);\n }\n return this;\n }",
"@Path(\"transaction\")\n @Service({\"transaction\"})\n public ResponseMessage processTransfer(Transaction t) {\n return tsi.processTransfer(t);\n }",
"private void deleteTransaction()\n {\n System.out.println(\"Delete transaction with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteTransaction(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.InputIDsOrBuilder getInputIdsOrBuilder() {\n if ((inputSourceCase_ == 2) && (inputIdsBuilder_ != null)) {\n return inputIdsBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 2) {\n return (com.clarifai.grpc.api.InputIDs) inputSource_;\n }\n return com.clarifai.grpc.api.InputIDs.getDefaultInstance();\n }\n }",
"private static void createDummyTransactions() {\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 10L, new Transaction(10000d, \"cars\", 0L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 11L, new Transaction(15000d, \"shopping\", 10L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 12L, new Transaction(20000d, \"keys\", 11L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 13L, new Transaction(25000d, \"furniture\", 12L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 14L, new Transaction(30000d, \"keys\", 13L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 15L, new Transaction(40000d, \"cars\", 14L)));\n targetAndTransactions.add(new TargetAndTransaction(rootWebTarget, 16L, new Transaction(50000d, \"cars\", 15L)));\n }",
"public void setTransferId(Long value) {\n this.transferId = value;\n }",
"com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();",
"R extractRawInputs(I input);"
] |
[
"0.63837165",
"0.63837165",
"0.63837165",
"0.62429434",
"0.60042346",
"0.60042346",
"0.60042346",
"0.5733805",
"0.5686599",
"0.5686599",
"0.5686599",
"0.56615967",
"0.56615967",
"0.56615967",
"0.56569576",
"0.56569576",
"0.56569576",
"0.56564087",
"0.56564087",
"0.56564087",
"0.5533423",
"0.54596907",
"0.54596907",
"0.54596907",
"0.5405708",
"0.5405708",
"0.5405708",
"0.53971845",
"0.5359305",
"0.5359305",
"0.5359305",
"0.5354408",
"0.5354408",
"0.5354408",
"0.52416927",
"0.51766443",
"0.5176379",
"0.5162406",
"0.5153655",
"0.51527417",
"0.5133659",
"0.5127168",
"0.50802207",
"0.5055927",
"0.50468606",
"0.5040226",
"0.503414",
"0.50281066",
"0.502728",
"0.50199795",
"0.50148636",
"0.5014665",
"0.5014665",
"0.5014665",
"0.50090206",
"0.5002316",
"0.49961406",
"0.49815387",
"0.49815387",
"0.49815387",
"0.49741232",
"0.49630836",
"0.49564418",
"0.49491987",
"0.49488533",
"0.49445122",
"0.4940807",
"0.49253768",
"0.49200726",
"0.49186495",
"0.4904385",
"0.4878816",
"0.48621",
"0.4857075",
"0.48559475",
"0.48497987",
"0.48497987",
"0.48497987",
"0.48453197",
"0.48370963",
"0.48343113",
"0.4831825",
"0.48097378",
"0.4807159",
"0.4806306",
"0.48000455",
"0.47996932",
"0.4798293",
"0.4796266",
"0.4796266",
"0.4796266",
"0.47903568",
"0.47899413",
"0.47874904",
"0.4786568",
"0.47801545",
"0.47612053",
"0.47569036"
] |
0.4983671
|
58
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.