Skip to content

Commit

Permalink
Fixup jsdocs and add TSdef
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Aug 10, 2023
1 parent 933a322 commit 2798f49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 4 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ export class Address {

export class Contract {
constructor(contractId: string);
call(method: string, ...params: xdr.ScVal[]): xdr.Operation<Operation.InvokeHostFunction>;
contractId(): string;
address(): Address;
call(method: string, ...params: xdr.ScVal[]): xdr.Operation<Operation.InvokeHostFunction>;
getFootprint(): xdr.LedgerKey;
getFootprint(): xdr.LedgerKey[];

toString(): string;
}

export class MuxedAccount {
Expand Down

0 comments on commit 2798f49

Please sign in to comment.