Skip to content

Commit

Permalink
ALL-6427 - Add server.banner rostrum method
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel authored and rostislavjadavan committed May 6, 2024
1 parent 3dcf081 commit c24aae5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tatum",
"version": "4.2.24",
"version": "4.2.25",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
2 changes: 2 additions & 0 deletions src/dto/rpc/RostrumRpcSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,4 +805,6 @@ export interface RostrumRpcInterface {
cashAccountQueryName: (
params: CashAccountQueryNameParams,
) => Promise<JsonRpcResponse<CashAccountQueryResult>>

serverBanner: () => Promise<JsonRpcResponse<string>>
}
7 changes: 7 additions & 0 deletions src/e2e/rpc/other/tatum.rpc.rostrum.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,11 @@ describe('Rostrum', () => {
await rostrum.destroy()
expect(result.result).toBeDefined()
})

it('server.banner', async () => {
const rostrum = await getRostrumRpc()
const result = await rostrum.rpc.serverBanner()
await rostrum.destroy()
expect(result.result).toBeDefined()
})
})
4 changes: 4 additions & 0 deletions src/service/rpc/other/AbstractRostrumRpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,8 @@ export abstract class AbstractRostrumRpc implements RostrumRpcInterface {
}: CashAccountQueryNameParams): Promise<JsonRpcResponse<CashAccountQueryResult>> {
return this.rpcCall('cashaccount.query.name', [name, height])
}

async serverBanner(): Promise<JsonRpcResponse<string>> {
return this.rpcCall('server.banner')
}
}

0 comments on commit c24aae5

Please sign in to comment.