@abstraxn/relayer 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Readme.md +61 -1
  2. package/package.json +1 -1
package/Readme.md CHANGED
@@ -1 +1,61 @@
1
- ## Relayer
1
+ # Relayer
2
+
3
+ ## Overview
4
+
5
+ The Abstraxn Relayer package is designed for handling gas-less transactions, facilitating smart contract interactions, and efficiently relaying user transactions on the Ethereum blockchain.
6
+
7
+ ## Installation
8
+
9
+ Using `npm` package manager:
10
+
11
+ ```bash
12
+ npm install @abstraxn/relayer
13
+ ```
14
+
15
+ Or using `yarn` package manager:
16
+
17
+ ```bash
18
+ yarn add @abstraxn/relayer
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```typescript
24
+ import { Relayer } from "@abstraxn/relayer";
25
+ import { ChainId } from "@abstraxn/core-types";
26
+
27
+ const relayerConfig = {
28
+ relayerUrl: "https://your-relayer-url.com",
29
+ chainId: ChainId.MAINNET,
30
+ signer: yourSignerInstance,
31
+ provider: yourProviderInstance,
32
+ };
33
+
34
+ const relayer = new Relayer(relayerConfig);
35
+
36
+ // Example: Building a relayer transaction
37
+ const buildTxParams = {
38
+ contractAddress: "0xYourContractAddress",
39
+ abi: yourContractAbi,
40
+ method: "yourMethodName",
41
+ args: ["arg1", "arg2"],
42
+ };
43
+
44
+ relayer.buildRelayerTx(buildTxParams).then((response) => {
45
+ console.log("Build Relayer Transaction Response: ", response);
46
+ });
47
+ ```
48
+
49
+ ## API
50
+
51
+ ### Methods
52
+
53
+ - **buildRelayerTx(params: BuildRelayerTxParams)**
54
+ - Builds a transaction to be sent to the relayer.
55
+
56
+ - **sendRelayerTx(params: SendRelayerTxParams)**
57
+ - Sends a transaction to the relayer for processing.
58
+
59
+ - **getRelayerTxStatus(transactionId: string)**
60
+ - Retrieves the status of a relayer transaction.
61
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abstraxn/relayer",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Abstraxn Relayer package for handling gas-less transactions, facilitating smart contract interactions, and relaying user transactions efficiently.",
5
5
  "main": "./dist/src/index.js",
6
6
  "typings": "./dist/src/index.d.ts",