How to use the nem2-sdk.Deadline.create function in nem2-sdk

To help you get started, we’ve selected a few nem2-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github luxtagofficial / Apostille-library / src / model / apostille / ApostillePublicAccount.ts View on Github external
public update(rawData: string, destAddress?: Address): TransferTransaction {
    const plainMessage = PlainMessage.create(rawData);

    const creationTransaction = TransferTransaction.create(
      Deadline.create(),
      destAddress || this.publicAccount.address,
      [],
      plainMessage,
      this.publicAccount.address.networkType,
    );

    return creationTransaction;
  }
github luxtagofficial / Apostille-library / src / model / apostille / PublicApostille.ts View on Github external
public update(fileContent: string, hashFunction: HashFunction): TransferTransaction {
    this.hash = hashFunction.nonSignedHashing(fileContent);
    const creationTransaction = TransferTransaction.create(
      Deadline.create(),
      this.sinkAddress,
      [
        new Mosaic(new NamespaceId('nem.xem'), UInt64.fromUint(10)),
      ],
      PlainMessage.create(this.hash),
      this.sinkAddress.networkType,
    );
    return creationTransaction;
  }
github nemtech / nem2-cli / src / commands / transaction / transfer.ts View on Github external
recipientPublicAccount.publicKey,
                    profile.networkType);
            } else if (options.encrypted) {
                const recipientPublicAccount = new RecipientPublicKeyResolver().resolve(options, profile);
                message = account.encryptMessage(
                    rawMessage,
                    recipientPublicAccount,
                    profile.networkType);
            } else {
                message = PlainMessage.create(rawMessage);
            }
        }
        const maxFee = new MaxFeeResolver().resolve(options);

        const transferTransaction = TransferTransaction.create(
            Deadline.create(),
            recipientAddress,
            mosaics,
            message,
            profile.networkType,
            maxFee);

        const signedTransaction = account.sign(transferTransaction, profile.networkGenerationHash);
        this.announceTransaction(signedTransaction, profile.url);
    }
}

nem2-sdk

Reactive Nem2 sdk for typescript and javascript

Apache-2.0
Latest version published 4 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages