diff --git a/types/stellar-sdk/index.d.ts b/types/stellar-sdk/index.d.ts index 581523ccb6..68ad432585 100644 --- a/types/stellar-sdk/index.d.ts +++ b/types/stellar-sdk/index.d.ts @@ -10,7 +10,7 @@ /// export class Account { - constructor(accountId: string, sequence: string | number) + constructor(accountId: string, sequence: string) accountId(): string; sequenceNumber(): string; incrementSequenceNumber(): void; @@ -98,10 +98,10 @@ export interface AccountRecord extends Record { weight: number } >; - data: { + data: (options: {value: string}) => Promise<{value: string}>; + data_attr: { [key: string]: string }; - effects: CallCollectionFunction; offers: CallCollectionFunction; operations: CallCollectionFunction; @@ -437,7 +437,8 @@ export class AccountResponse implements AccountRecord { weight: number } >; - data: { + data: (options: {value: string}) => Promise<{value: string}>; + data_attr: { [key: string]: string }; @@ -894,6 +895,7 @@ export namespace xdr { static fromXDR(xdr: Buffer): XDRStruct; toXDR(): Buffer; + toXDR(encoding: string): string; } class Operation extends XDRStruct { } class Asset extends XDRStruct { } diff --git a/types/stellar-sdk/stellar-sdk-tests.ts b/types/stellar-sdk/stellar-sdk-tests.ts index 8ff71d7fb6..fe72b84a66 100644 --- a/types/stellar-sdk/stellar-sdk-tests.ts +++ b/types/stellar-sdk/stellar-sdk-tests.ts @@ -2,7 +2,7 @@ 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 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"))