@collabland/near-indexer
v0.24.4
Published
CollabLand SDK for NEAR indexer
Downloads
218
Readme
@collabland/near-indexer
Installation
Install NearIndexerComponent using npm
;
$ [npm install | yarn add] @collabland/near-indexer
Basic Use
Configure and load NearIndexerComponent in the application constructor as shown below.
import {NearIndexerComponent, NearIndexerComponentOptions, DEFAULT_COLLABLAND_NEAR_INDEXER_OPTIONS} from '@collabland/near-indexer';
// ...
export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
constructor(options: ApplicationConfig = {}) {
const opts: NearIndexerComponentOptions = DEFAULT_COLLABLAND_NEAR_INDEXER_OPTIONS;
this.configure(NearIndexerComponentBindings.COMPONENT).to(opts);
// Put the configuration options here
});
this.component(NearIndexerComponent);
// ...
}
// ...
}