net.corda.core.contracts

## Class TransactionType.NotaryChange

- net.corda.core.contracts.TransactionType
- - net.corda.core.contracts.TransactionType.NotaryChange

- Enclosing class:
    TransactionType

      public static class TransactionType.NotaryChange
      extends TransactionType

  A special transaction type for reassigning a notary for a state. Validation does not involve running any contract code, it just checks that the states are unmodified apart from the notary field.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `NotaryChange.Builder` A transaction builder that automatically sets the transaction type to `class TransactionType.NotaryChange` and adds the list of participants to the signers set for every input state.

    - ### Nested classes/interfaces inherited from class net.corda.core.contracts.TransactionType

      `TransactionType.General, TransactionType.NotaryChange`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotaryChange()` A special transaction type for reassigning a notary for a state. Validation does not involve running any contract code, it just checks that the states are unmodified apart from the notary field.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<net.corda.core.crypto.CompositeKey>` | `getRequiredSigners(LedgerTransaction tx)` Return the list of public keys that that require signatures for the transaction type. Note: the notary key is checked separately for all transactions and need not be included.
    `void` | `verifyTransaction(LedgerTransaction tx)` Check that the difference between inputs and outputs is only the notary field, and that all required signing public keys are present.

    - ### Methods inherited from class net.corda.core.contracts.TransactionType

      `equals, getRequiredSigners, hashCode, verify, verifySigners, verifyTransaction`

- - ### Constructor Detail

    - #### NotaryChange

          public NotaryChange()

      A special transaction type for reassigning a notary for a state. Validation does not involve running any contract code, it just checks that the states are unmodified apart from the notary field.

  - ### Method Detail

    - #### verifyTransaction

          public void verifyTransaction(LedgerTransaction tx)

      Check that the difference between inputs and outputs is only the notary field, and that all required signing public keys are present.

      Throws:
        `InvalidNotaryChange` - if the validity check fails.

    - #### getRequiredSigners

          public java.util.Set<net.corda.core.crypto.CompositeKey> getRequiredSigners(LedgerTransaction tx)

      Return the list of public keys that that require signatures for the transaction type. Note: the notary key is checked separately for all transactions and need not be included.