Files
DefinitelyTyped/types/stellar-sdk/stellar-sdk-tests.ts
2018-06-29 01:02:45 -04:00

11 lines
527 B
TypeScript

import * as StellarSdk from 'stellar-sdk';
const sourceKey = StellarSdk.Keypair.random(); // $ExpectType Keypair
const destKey = StellarSdk.Keypair.random();
const account = new StellarSdk.Account(sourceKey.publicKey(), 1);
const transaction = new StellarSdk.TransactionBuilder(account)
.addOperation(StellarSdk.Operation.accountMerge({destination: destKey.publicKey()}))
.addMemo(new StellarSdk.Memo(StellarSdk.MemoText, "memo"))
.build(); // $ExpectType () => Transaction
transaction; // $ExpectType Transaction