Tabnine Logo
Contract.setOwnerKey
Code IndexAdd Tabnine to your IDE (free)

How to use
setOwnerKey
method
in
com.icodici.universa.contract.Contract

Best Java code snippets using com.icodici.universa.contract.Contract.setOwnerKey (Showing top 20 results out of 315)

origin: UniversaBlockchain/universa

protected Contract createCoin(String yamlFilePath) throws IOException {
  Contract c = Contract.fromDslFile(yamlFilePath);
  c.setOwnerKey(ownerKey2);
  return c;
}
origin: UniversaBlockchain/universa

anonOwnerContract.setOwnerKey(stepaAddress);
anonOwnerContract.seal();
anonOwnerContract.check();
origin: UniversaBlockchain/universa

Contract anonOwnerContract = c1.createRevisionWithAddress(Arrays.asList(key));
anonOwnerContract.addSignerKey(key);
anonOwnerContract.setOwnerKey(stepaAddress);
anonOwnerContract.seal();
anonOwnerContract.check();
origin: UniversaBlockchain/universa

protected static Contract createCoin(String yamlFilePath) throws IOException {
  Contract c = Contract.fromDslFile(yamlFilePath);
  c.setOwnerKey(ownerKey2);
  return c;
}
origin: UniversaBlockchain/universa

anonOwnerContract.setOwnerKey(stepaAnonId);
anonOwnerContract.seal();
anonOwnerContract.check();
origin: UniversaBlockchain/universa

private Contract basicContractCreation(final String fileName, final String keyFileName, final PrivateKey key) throws Exception {
  Contract c = Contract.fromDslFile(rootPath + fileName);
  c.setOwnerKey(key);
  c.addSignerKeyFromFile(rootPath + keyFileName);
  c.seal();
  c.check();
  c.traceErrors();
  assertTrue(c.check());
  return c;
}
origin: UniversaBlockchain/universa

Contract anonOwnerContract = c1.createRevisionAnonymously(Arrays.asList(key));
anonOwnerContract.addSignerKey(key);
anonOwnerContract.setOwnerKey(stepaAnonId);
anonOwnerContract.seal();
anonOwnerContract.check();
origin: UniversaBlockchain/universa

c.addSignerKeyFromFile(rootPath + "_xer0yfe2nn1xthc.private.unikey");
c.setOwnerKey(ownerKey1);
assertThat(c.getPermissions().getFirst("change_owner").getRole(), is(instanceOf(RoleLink.class)));
assertTrue(c.getPermissions().getFirst("change_owner").getRole().isAllowedForKeys(new HashSet(Do.listOf(ownerKey1))));
c2.setOwnerKey(ownerKey3);
badc.setOwnerKey(ownerKey1);
badc.seal();
assertFalse(badc.check());
c3.setOwnerKey(ownerKey2);
c3.seal();
assertTrue(c3.isOk());
origin: UniversaBlockchain/universa

c1.setOwnerKey(ownerKey2);
c1.addNewItems(jobCertificate);
assertNotEquals(c.getOwner(), c1.getOwner());
c2.setOwnerKey(ownerKey3);
assertEquals(c2, c2.getPermissions().getFirst("change_owner").getRole().getContract());
assertNotEquals(c.getOwner(), c2.getOwner());
c3.setOwnerKey(ownerKey3);
c3.addNewItems(jobCertificate);
assertEquals(c3, c3.getPermissions().getFirst("change_owner").getRole().getContract());
origin: UniversaBlockchain/universa

c1.setOwnerKey(ownerKey2);
c1.findReferenceByName("certification_contract").addMatchingItem(referencedItem);
assertNotEquals(c.getOwner(), c1.getOwner());
origin: UniversaBlockchain/universa

revContract.setOwnerKey(manufacturePrivateKey);
revContract.addSignerKey(manufacturePrivateKey);
rev2Contract.setOwnerKey(ownerPrivateKey);
origin: UniversaBlockchain/universa

c.addSignerKeyFromFile(PRIVATE_KEY_PATH);
c.setOwnerKey(ownerKey1);
assertThat(c.getPermissions().getFirst("change_owner").getRole(), is(instanceOf(RoleLink.class)));
assertTrue(c.getPermissions().getFirst("change_owner").getRole().isAllowedForKeys(new HashSet(Do.listOf(ownerKey1))));
c1.setOwnerKey(ownerKey2);
assertNotEquals(c.getOwner(), c1.getOwner());
c1.seal();
assertEquals(c2, ((RoleLink) c2.getPermissions().getFirst("change_owner").getRole()).getContract());
assertEquals(c, ((RoleLink) c.getPermissions().getFirst("change_owner").getRole()).getContract());
c2.setOwnerKey(ownerKey3);
assertNotEquals(c.getOwner(), c2.getOwner());
assertEquals(c.getOwner(), ((RoleLink) c.getPermissions().getFirst("change_owner").getRole()).getRole());
origin: UniversaBlockchain/universa

contractToJoin.setOwnerKey(ownerKey2.getPublicKey());
contractToJoin.getDefinition().getData().set("currency","UTN");
ownerLink = new RoleLink("@onwer_link","owner");
origin: UniversaBlockchain/universa

part1.setOwnerKey(owner1.getPublicKey());
part1.getStateData().set("amount","1000");
part2.setOwnerKey(owner2.getPublicKey());
part2.getStateData().set("amount","1000");
part3.setOwnerKey(owner3.getPublicKey());
part3.getStateData().set("amount","1000");
origin: UniversaBlockchain/universa

simpleContract2.setOwnerKey(stepaPrivateKeys.iterator().next().getPublicKey());
simpleContract2.seal();
simpleContract2.check();
origin: UniversaBlockchain/universa

revContract.setOwnerKey(manufacturePrivateKey);
revContract.addSignerKey(manufacturePrivateKey);
revContract.addSignerKey(ownerPrivateKey);
origin: UniversaBlockchain/universa

revContract.setOwnerKey(manufacturePrivateKey);
revContract.addSignerKey(manufacturePrivateKey);
revContract.addSignerKey(ownerPrivateKey);
origin: UniversaBlockchain/universa

revContract.setOwnerKey(manufacturePrivateKey);
revContract.addSignerKey(manufacturePrivateKey);
revContract.addSignerKey(ownerPrivateKey);
origin: UniversaBlockchain/universa

root.getStateData().set(FIELD_NAME, new Decimal(200));
root.addSignerKeyFromFile("./src/test_contracts/" + PRIVATE_KEY);
root.setOwnerKey(ownerKey2);
root.seal();
assertTrue(root.check());
origin: UniversaBlockchain/universa

@Test
public void changeNumber() throws Exception {
  Contract c = Contract.fromDslFile(SUBSCRIPTION_PATH);
  c.setOwnerKey(ownerKey2);
com.icodici.universa.contractContractsetOwnerKey

Javadoc

Set "owner" role to given key or key record

Popular methods of Contract

  • <init>
    Extract old, deprecated v2 self-contained binary partially unpacked by the TransactionPack, and fill
  • addNewItems
    Add one or more siblings to the contract. Note that those must be sealed before calling #seal() or #
  • addSignerKey
    Add private key to keys contract binary to be signed with when sealed next time. It is called before
  • getExpiresAt
    Get contract expiration time
  • getId
    Get the id sealing self if need
  • getPackedTransaction
    Pack the contract to the most modern .unicon format, same as TransactionPack#pack(). Uses bounded Tr
  • registerRole
    Register new role. Name must be unique otherwise existing role will be overwritten
  • seal
    Seal contract to binary. This call adds signatures from #getKeysToSignWith()
  • addSignatureToSeal
    Add signature to sealed (before) contract. Do not deserializing or changing contract bytes, but will
  • check
  • createRevision
    Create new revision to be changed, signed sealed and then ready to approve. Created "revision" contr
  • fromDslFile
    Create contract importing its parameters with passed .yaml file. No signatures are added automatical
  • createRevision,
  • fromDslFile,
  • fromPackedTransaction,
  • getCreatedAt,
  • getDefinition,
  • getErrors,
  • getKeysToSignWith,
  • getLastSealedBinary,
  • getNew,
  • getNewItems

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now