Skip to content

Commit f3a0df1

Browse files
authored
Merge pull request #183 from UniqueNetwork/staking
Add stake example
2 parents 71900c8 + 3efe455 commit f3a0df1

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/build/sdk/v2/indexer.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,22 @@ const searchEvents = async () => {
238238
console.log('Events', events);
239239
};
240240
```
241+
242+
## Staking
243+
244+
Retrieve extrinsic operations related to staking, filtered by the signer's address and the `stake` method.
245+
246+
```typescript
247+
const getStakingExtrinsics = async (signerAddress: string) => {
248+
const indexerClient = UniqueIndexer({
249+
baseUrl: "https://api-unique.uniquescan.io/v2",
250+
});
251+
252+
const extrinsics = await indexerClient.extrinsics({
253+
signerIn: [signerAddress],
254+
methodIn: ["stake"],
255+
sectionIn: ["appPromotion"],
256+
});
257+
258+
console.log('Staking Extrinsics', extrinsics);
259+
};

0 commit comments

Comments
 (0)