sdk-triggerx 0.1.1 → 0.1.2
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.
- package/README.md +2 -3
- package/package.json +1 -1
- package/test/createJobExample.ts +3 -4
package/README.md
CHANGED
|
@@ -31,11 +31,10 @@ npm install sdk-triggerx
|
|
|
31
31
|
import { TriggerXClient } from 'sdk-triggerx';
|
|
32
32
|
|
|
33
33
|
const client = new TriggerXClient('YOUR_API_KEY');
|
|
34
|
-
|
|
35
|
-
//👉 To get your API key, visit: [https://app.triggerx.network/generate-api](https://app.triggerx.network/generate-api)
|
|
36
|
-
|
|
37
34
|
```
|
|
38
35
|
|
|
36
|
+
- To get your API key, visit: [Generate API Key](https://app.triggerx.network/generate-api)
|
|
37
|
+
|
|
39
38
|
---
|
|
40
39
|
|
|
41
40
|
### 2. Create a Job
|
package/package.json
CHANGED
package/test/createJobExample.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ethers } from 'ethers';
|
|
|
4
4
|
|
|
5
5
|
async function main() {
|
|
6
6
|
|
|
7
|
-
const apiKey = '
|
|
7
|
+
const apiKey = '';
|
|
8
8
|
const client = new TriggerXClient(apiKey);
|
|
9
9
|
|
|
10
10
|
// Example: Time-based static job
|
|
@@ -34,7 +34,6 @@ async function main() {
|
|
|
34
34
|
// const jobInput: CreateJobInput = {
|
|
35
35
|
// jobType: JobType.Condition,
|
|
36
36
|
// argType: ArgType.Static,
|
|
37
|
-
// userAddress: '0x7Db951c0E6D8906687B459427eA3F3F2b456473A',
|
|
38
37
|
// jobTitle: 'SDK Test Condition Job',
|
|
39
38
|
// timeFrame: 48,
|
|
40
39
|
// conditionType: 'greaterThan',
|
|
@@ -63,8 +62,8 @@ async function main() {
|
|
|
63
62
|
// console.log('Condition Job creation result:', conditionResult);
|
|
64
63
|
|
|
65
64
|
// These would typically come from env/config/user input
|
|
66
|
-
const privateKey = '
|
|
67
|
-
const providerUrl = '
|
|
65
|
+
const privateKey = '';
|
|
66
|
+
const providerUrl = '';
|
|
68
67
|
const provider = new ethers.JsonRpcProvider(providerUrl);
|
|
69
68
|
const signer = new ethers.Wallet(privateKey, provider);
|
|
70
69
|
|