This project was generated with Angular CLI version 6.0.x.
Angular Request Network
Run ng serve
for a dev server. Navigate to http://localhost:4200/
.
The app will automatically reload if you change any of the source files.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
Documentation about Request Network JS Library: Request Library API
Request Network Service:
# method to create new request as Payer or Payee for different currencies
createRequest(
payerAddress: string, role: Types.Role, currency: Types.Currency,
amount: number, requestOptions: Types.IRequestCreationOptions, callback?)
# method to get request instance by request id
getRequestByRequestId(
requestId: string
)
# method to get request instance by generated transaction hash
getRequestByTransactionHash(
txHash: string
)
# method to get request instance by address
getRequestsByAddress(
txHash: string
)
# method to get request events
getRequestsEvents(
requestId: string
)
// use import to the app.module or parent module of your project
import { RequestNetworkModule, RequestNetworkService } from 'angular-request-network';
// import module in imports and service in providers
@NgModule({
schemas: xx,
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
...
RequestNetworkModule.forRoot()
],
providers: [ RequestNetworkService ],
bootstrap: [AppComponent]
})
export class AppModule { }