From 2798f498e86821f398f123d83a7219ea2bdfb07b Mon Sep 17 00:00:00 2001 From: George Kudrayvtsev Date: Thu, 10 Aug 2023 13:56:05 -0700 Subject: [PATCH] Fixup jsdocs and add TSdef --- src/contract.js | 6 ++---- types/index.d.ts | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/contract.js b/src/contract.js index c5ffb6b5..4ecba2e2 100644 --- a/src/contract.js +++ b/src/contract.js @@ -36,14 +36,12 @@ export class Contract { return StrKey.encodeContract(this._id); } + /** @returns {string} the ID as a strkey (C...) */ toString() { return this.contractId(); } - /** - * Returns the address of this contract as an Address type. - * @returns {Address} - */ + /** @returns {Address} the wrapped address of this contract */ address() { return Address.contract(this._id); } diff --git a/types/index.d.ts b/types/index.d.ts index e56a289e..8bb10139 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -27,10 +27,12 @@ export class Address { export class Contract { constructor(contractId: string); + call(method: string, ...params: xdr.ScVal[]): xdr.Operation; contractId(): string; address(): Address; - call(method: string, ...params: xdr.ScVal[]): xdr.Operation; - getFootprint(): xdr.LedgerKey; + getFootprint(): xdr.LedgerKey[]; + + toString(): string; } export class MuxedAccount {