RawTransaction { @ApiAudience.Public public static StakeTransaction.WithNothing newStakeTxBuilder() { return new StakeTransactionBuilder(); }  @ApiAudience.Public static PlainTransaction.WithNothing newBuilder(); @ApiAudience.Public static PlainTransaction.WithChainIdHash newBuilder(final ChainIdHash chainIdHash); @ApiAudience.Public static DeployContractTransaction.WithNothing newDeployContractBuilder(); @ApiAudience.Public static ReDeployContractTransaction.WithNothing newReDeployContractBuilder(); @ApiAudience.Public static InvokeContractTransaction.WithNothing newInvokeContractBuilder(); @ApiAudience.Public static CreateNameTransaction.WithNothing newCreateNameTxBuilder(); @ApiAudience.Public static UpdateNameTransaction.WithNothing newUpdateNameTxBuilder(); @ApiAudience.Public static StakeTransaction.WithNothing newStakeTxBuilder(); @ApiAudience.Public static UnstakeTransaction.WithNothing newUnstakeTxBuilder(); @ApiAudience.Public static VoteTransaction.WithNothing newVoteTxBuilder(); RawTransaction withChainIdHash(final ChainIdHash chainIdHash); RawTransaction withNonce(final long nonce); TxHash calculateHash(); TxHash calculateHash(final Signature signature);  }
@Test public void testStakeTransaction() { final AergoKey aergoKey = new AergoKeyGenerator().create(); final RawTransaction stakeTransaction = RawTransaction.newStakeTxBuilder() .chainIdHash(ChainIdHash.of(BytesValue.EMPTY)) .from(aergoKey.getAddress()) .amount(Aer.of("10000", Unit.AERGO)) .nonce(1L) .build(); assertNotNull(stakeTransaction); }