File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -1825,15 +1825,34 @@ export class Bee {
18251825 *
18261826 * @see [Bee docs - Keep your data alive / Postage stamps](https://docs.ethswarm.org/docs/develop/access-the-swarm/introduction/#keep-your-data-alive)
18271827 * @see [Bee Debug API reference - `GET /stamps`](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps/get)
1828+ * @deprecated Use `getPostageBatches` instead
18281829 */
18291830 async getAllPostageBatch ( options ?: BeeRequestOptions ) : Promise < PostageBatch [ ] > {
1830- return stamps . getAllPostageBatches ( this . getRequestOptionsForCall ( options ) )
1831+ return stamps . getAllPostageBatches ( this . getRequestOptionsForCall ( options ) ) // TODO: remove in June 2025
18311832 }
18321833
18331834 /**
18341835 * Return all globally available postage batches.
1836+ * @deprecated Use `getGlobalPostageBatches` instead
18351837 */
18361838 async getAllGlobalPostageBatch ( options ?: BeeRequestOptions ) : Promise < GlobalPostageBatch [ ] > {
1839+ return stamps . getGlobalPostageBatches ( this . getRequestOptionsForCall ( options ) ) // TODO: remove in June 2025
1840+ }
1841+
1842+ /**
1843+ * Return all postage batches that belong to the node.
1844+ *
1845+ * @see [Bee docs - Keep your data alive / Postage stamps](https://docs.ethswarm.org/docs/develop/access-the-swarm/introduction/#keep-your-data-alive)
1846+ * @see [Bee Debug API reference - `GET /stamps`](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps/get)
1847+ */
1848+ async getPostageBatches ( options ?: BeeRequestOptions ) : Promise < PostageBatch [ ] > {
1849+ return stamps . getAllPostageBatches ( this . getRequestOptionsForCall ( options ) )
1850+ }
1851+
1852+ /**
1853+ * Return all globally available postage batches.
1854+ */
1855+ async getGlobalPostageBatches ( options ?: BeeRequestOptions ) : Promise < GlobalPostageBatch [ ] > {
18371856 return stamps . getGlobalPostageBatches ( this . getRequestOptionsForCall ( options ) )
18381857 }
18391858
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { batch, makeBee } from '../utils'
55const bee = makeBee ( )
66
77test ( 'GET stamps' , async ( ) => {
8- const stamps = await bee . getAllPostageBatch ( )
8+ const stamps = await bee . getPostageBatches ( )
99 expect ( stamps . length ) . toBeGreaterThan ( 0 )
1010
1111 const stamp = await bee . getPostageBatch ( stamps [ 0 ] . batchID )
@@ -16,7 +16,7 @@ test('GET stamps', async () => {
1616} )
1717
1818test ( 'GET batches' , async ( ) => {
19- const batches = await bee . getAllGlobalPostageBatch ( )
19+ const batches = await bee . getGlobalPostageBatches ( )
2020 expect ( batches . length ) . toBeGreaterThan ( 0 )
2121} )
2222
You can’t perform that action at this time.
0 commit comments