Skip to content

Commit

Permalink
Merge pull request #147 from ainblockchain/bugfix/platfowner/bugfix
Browse files Browse the repository at this point in the history
Add typedoc comments for layer 2 classes
  • Loading branch information
platfowner authored Sep 22, 2023
2 parents 187777e + 2be3e5c commit 03e40de
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 206 deletions.
16 changes: 10 additions & 6 deletions src/ain-db/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ import Reference from './ref';
import Ain from '../ain';
import Provider from '../provider';

/**
* A class for managing the states of the blockchain database.
*/
export default class Database {
/** The network provider object. */
public provider: Provider;
/** The Ain object. */
private _ain: Ain;

/**
* @param {Ain} ain
* @param {Provider} provider
*
* @constructor
* Creates a new Database object.
* @param {Ain} ain The Ain object.
* @param {Provider} provider The network provider object.
*/
constructor(ain: Ain, provider: Provider) {
this.provider = provider;
Expand All @@ -19,8 +23,8 @@ export default class Database {

/**
* Returns a reference instance of the given path.
* @param {String} path
* @return {Reference} A reference instance of the given path.
* @param {String} path The path to refer to.
* @returns {Reference} A reference instance of the given path.
*/
ref(path?: string): Reference {
return new Reference(this._ain, path);
Expand Down
Loading

0 comments on commit 03e40de

Please sign in to comment.