diff --git a/src/indexer/subapis/newbie.ts b/src/indexer/subapis/newbie.ts index c550ffc1..927cb489 100644 --- a/src/indexer/subapis/newbie.ts +++ b/src/indexer/subapis/newbie.ts @@ -6,6 +6,7 @@ import { type LinkItemType, type NoteEntity, type NoteMetadata, + type Numberish, } from '../../types' import { type BaseIndexer } from './base' @@ -277,6 +278,44 @@ export class NewbieIndexer { ) } + tipCharacter({ + characterId, + amount, + }: { + characterId: Numberish + /** amount to tip. (CSB in wei) */ + amount: Numberish + }) { + return this.base.fetch<{ transactionHash: string; data: boolean }>( + `/newbie/contract/tips`, + { + method: 'POST', + data: { characterId, amount }, + token: this.token, + }, + ) + } + + tipCharacterForNote({ + characterId, + noteId, + amount, + }: { + characterId: Numberish + noteId: Numberish + /** amount to tip. (CSB in wei) */ + amount: Numberish + }) { + return this.base.fetch<{ transactionHash: string; data: boolean }>( + `/newbie/contract/tips`, + { + method: 'POST', + data: { characterId, noteId, amount }, + token: this.token, + }, + ) + } + /** * Get proofs for withdraw to call `withdraw` contract method on client */