/** * Create escrow contracts (external and internal) for a expiration period of 5 years. * External escrow contract includes internal escrow contract. Contracts are linked by internal escrow contract origin. * To internal escrow contract establishes the owner role, {@link ListRole} on the basis of the quorum of 2 of 3 roles: customer, executor and arbitrator. * This role is granted exclusive permission to change the value of the status field of internal escrow contract (state.data.status). * Possible values for the internal escrow contract status field are: opened, completed and canceled. * * If necessary, the contents and parameters (expiration period, for example) of escrow contracts * can be changed before sealing and registration. If internal escrow contract has changed, need re-create external * escrow contract by {@link ContractsService#createExternalEscrowContract(Contract, Collection)}. * * @param issuerKeys issuer escrow contract private keys * @param customerKeys customer public keys * @param executorKeys executor public keys * @param arbitratorKeys arbitrator public keys * * @return external escrow contract */ public static Contract createEscrowContract( Collection<PrivateKey> issuerKeys, Collection<PublicKey> customerKeys, Collection<PublicKey> executorKeys, Collection<PublicKey> arbitratorKeys) { // Create internal escrow contract Contract escrow = createInternalEscrowContract(issuerKeys, customerKeys, executorKeys, arbitratorKeys); // Create external escrow contract (escrow pack) Contract escrowPack = createExternalEscrowContract(escrow, issuerKeys); return escrowPack; }
Contract escrow = ContractsService.createInternalEscrowContract(issuerPrivateKeys, customerPublicKeys, executorPublicKeys, arbitratorPublicKeys);
Contract escrow = ContractsService.createInternalEscrowContract(issuerPrivateKeys, customerPublicKeys, executorPublicKeys, arbitratorPublicKeys);
Contract escrow = ContractsService.createInternalEscrowContract(issuerPrivateKeys, customerPublicKeys, executorPublicKeys, arbitratorPublicKeys);
Contract escrow = ContractsService.createInternalEscrowContract(issuerPrivateKeys, customerPublicKeys, executorPublicKeys, arbitratorPublicKeys);