mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 11:51:10 +08:00
11 lines
527 B
TypeScript
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
|