The programming interface uses a builder pattern to mount an API.
For sake of simplicity the composeApi method mounts the entire API, i.e.
all available methods are mounted using this class
const api = composeApi({
nodeHost: 'https://wallet1.burst-team.us:2083', // one of the mainnet nodes
apiRootUrl: '/burst'// endpoint to the BURST API
})
While this is a straightforward way to have access to all BURST functionality, this methods
has the disadvantage of including all needed dependencies, thus leading to a bigger bundle, for those
who use bundlers like webpack. To reduce the bundle size, one may mount the API
conforming his needs using the ApiComposer class.
The API structure returned by composeApi
The programming interface uses a builder pattern to mount an API. For sake of simplicity the composeApi method mounts the entire API, i.e. all available methods are mounted using this class
const api = composeApi({ nodeHost: 'https://wallet1.burst-team.us:2083', // one of the mainnet nodes apiRootUrl: '/burst' // endpoint to the BURST API })While this is a straightforward way to have access to all BURST functionality, this methods has the disadvantage of including all needed dependencies, thus leading to a bigger bundle, for those who use bundlers like webpack. To reduce the bundle size, one may mount the API conforming his needs using the ApiComposer class.