@avaprotocol/sdk-js 0.6.11 → 0.7.1

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 CHANGED
@@ -38,46 +38,100 @@ import { AvaSDK } from "ava-sdk-js";
38
38
  In the case of `.proto` files at https://github.com/AvaProtocol/EigenLayer-AVS/blob/main/protobuf/avs.proto changes, the gRPC types needs to be regenerated.Before regenerating the types from the protocol buffers, ensure that `grpc_tools_node_protoc` is installed globally on your system. You can install it using npm:
39
39
 
40
40
  ```bash
41
- npm install -g grpc-tools
41
+ npm install # install grpc-tools, etc. as dev dependencies
42
42
  ```
43
43
 
44
44
  Then, run the following command to regenerate the types:
45
45
 
46
46
  ```bash
47
+ # download the latest .proto file from https://github.com/AvaProtocol/EigenLayer-AVS
48
+ npm run proto-download
49
+
50
+ # Generate the TypeScript types and gRPC code based on the downloaded .proto file
47
51
  npm run gen-protoc
48
52
  ```
49
53
 
50
- This will automatically download the latest `.proto` file from https://github.com/AvaProtocol/EigenLayer-AVS and generate the updated TypeScript types and gRPC code, ensuring that all changes are reflected in the SDK.
54
+ > Important: the last line of the `grpc_codegen/avs_pb.js` needs to be manually added after the `gen-protoc` command. These type definitions must be exported; otherwise they will be undefined in the SDK. For example: `export const { Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest } = proto.aggregator;`
51
55
 
52
56
  ### Running Tests
53
57
 
54
58
  To ensure the SDK is functioning correctly, we have a comprehensive test suite. Follow these steps to run the tests:
55
59
 
56
- 1. Make sure all dependencies are installed:
60
+ 1. Make sure all dependencies are installed, and build the project. Tests are run against the files in the `/dist` folder
57
61
  ```bash
58
62
  npm install
63
+ npm run build
59
64
  ```
65
+ 2. Before running the e2e tests, make sure to configure the required environment variables in your `.env.test` file, based on the `.env.example` file.
66
+
67
+ 3. Run the test command. This will test the SDK against test server, configured in `.env.test`.
60
68
 
61
- 2. Run the test command. This will test the SDK against mockup responses.
62
69
  ```bash
70
+ # Run all tests
63
71
  npm test
72
+
73
+ # or, run a specific test
74
+ npm run test:select -- <authWithSignature>
64
75
  ```
65
-
66
- 3. To test the SDK against the live AVS on Ethereum Mainnet, you can run the following command:
76
+
77
+ 4. In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first.
67
78
  ```bash
68
- npm run test:e2e
79
+ npm run test:select -- "createTask|cancelTask"
69
80
  ```
70
81
 
71
- Before running the e2e tests, make sure to configure the required TEST values in your `.env` file:
82
+ This will execute all unit and integration tests. Make sure all tests pass before submitting a pull request or deploying changes.
83
+
84
+ ## Version Management
72
85
 
73
- ```
74
- TEST_JWT_TOKEN=your_TEST_JWT_TOKEN_here
75
- TEST_OWNER=your_test_owner_here
86
+ This project uses [Changesets](https://github.com/changesets/changesets) to manage versions and changelogs. To contribute changes:
87
+
88
+ 1. Make your changes to the codebase.
89
+ 2. Run `npm run changeset` to create a new changeset.
90
+ 3. Follow the prompts to describe your changes.
91
+ 4. Commit the generated changeset file along with your changes.
92
+
93
+ To release a new version:
94
+
95
+ 1. Run `npm run version` to update package versions and changelogs.
96
+ 2. Review and commit the changes.
97
+ 3. Run `npm run release` to publish the new version to npm.
98
+
99
+ For more detailed information on using Changesets, refer to the [Changesets documentation](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md).
100
+
101
+ ## Release Process
102
+
103
+ This repository uses a two-step workflow process for creating new releases:
104
+
105
+ 1. **Record changeset workflow**
106
+ - Go to the "Actions" tab in GitHub, and run the "Record Changeset" workflow
107
+ - Select the version bump type:
108
+ - `patch` for backwards-compatible bug fixes (0.0.x)
109
+ - `minor` for backwards-compatible features (0.x.0)
110
+ - `major` for breaking changes (x.0.0)
111
+ - Examine the Pull Request created by the workflow, and merge it if everything looks correct. This will record any commits before it as a major, minor, or patch.
112
+
113
+ 2. **Create release workflow**
114
+ - Go to the "Actions" tab in GitHub and run the "Create Release" workflow. This will run `npx changeset version` to bump up version in `package.json` based on the recorded changeset files. It will also create a new GitHub Release if the new version is higher than the current version in `package.json`.
115
+
116
+ ### NPM Publishing
117
+
118
+ The NPM publishing should be handled manually, since the test cases reference the dist folder and don’t require a new version on NPM. NPM publish on dev tag is only required for testing the new version in a web app.
119
+ 1. Publish a dev version and test it in your local environment:
120
+ ```bash
121
+ # Update version with dev tag in package.json
122
+ npm version prerelease --preid=dev
123
+
124
+ # Publish to npm with dev tag
125
+ npm publish --tag dev
76
126
  ```
77
127
 
78
- Replace `your_TEST_JWT_TOKEN_here` with a valid JWT API key and `your_test_owner_here` with the appropriate owner address for testing.
128
+ 2. Once tested, and a release is created using GitHub Actions, publish the production version to NPM:
129
+ ```bash
130
+ # Publish to npm with latest tag
131
+ npm publish
132
+ ```
79
133
 
80
- This will execute all unit and integration tests. Make sure all tests pass before submitting a pull request or deploying changes.
134
+ > **Note**: Make sure to run these workflows in order. The Version Bump workflow must complete successfully before running the Create Release workflow.
81
135
 
82
136
  ### Utility Scripts
83
137
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
+ import { Metadata } from '@grpc/grpc-js';
2
3
  import * as jspb from 'google-protobuf';
3
4
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
4
5
  import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb';
@@ -565,53 +566,53 @@ declare namespace Execution {
565
566
  }
566
567
  }
567
568
 
568
- declare class Task extends jspb.Message {
569
+ declare class Task$1 extends jspb.Message {
569
570
 
570
571
  hasId(): boolean;
571
572
  clearId(): void;
572
573
  getId(): UUID | undefined;
573
- setId(value?: UUID): Task;
574
+ setId(value?: UUID): Task$1;
574
575
  getOwner(): string;
575
- setOwner(value: string): Task;
576
+ setOwner(value: string): Task$1;
576
577
  getSmartAccountAddress(): string;
577
- setSmartAccountAddress(value: string): Task;
578
+ setSmartAccountAddress(value: string): Task$1;
578
579
 
579
580
  hasTrigger(): boolean;
580
581
  clearTrigger(): void;
581
582
  getTrigger(): TaskTrigger | undefined;
582
- setTrigger(value?: TaskTrigger): Task;
583
+ setTrigger(value?: TaskTrigger): Task$1;
583
584
  clearNodesList(): void;
584
585
  getNodesList(): Array<TaskAction>;
585
- setNodesList(value: Array<TaskAction>): Task;
586
+ setNodesList(value: Array<TaskAction>): Task$1;
586
587
  addNodes(value?: TaskAction, index?: number): TaskAction;
587
588
  getStartAt(): number;
588
- setStartAt(value: number): Task;
589
+ setStartAt(value: number): Task$1;
589
590
  getExpiredAt(): number;
590
- setExpiredAt(value: number): Task;
591
+ setExpiredAt(value: number): Task$1;
591
592
  getMemo(): string;
592
- setMemo(value: string): Task;
593
+ setMemo(value: string): Task$1;
593
594
  getCompletedAt(): number;
594
- setCompletedAt(value: number): Task;
595
+ setCompletedAt(value: number): Task$1;
595
596
  getStatus(): TaskStatus;
596
- setStatus(value: TaskStatus): Task;
597
+ setStatus(value: TaskStatus): Task$1;
597
598
  getRepeatable(): boolean;
598
- setRepeatable(value: boolean): Task;
599
+ setRepeatable(value: boolean): Task$1;
599
600
  clearExecutionsList(): void;
600
601
  getExecutionsList(): Array<Execution>;
601
- setExecutionsList(value: Array<Execution>): Task;
602
+ setExecutionsList(value: Array<Execution>): Task$1;
602
603
  addExecutions(value?: Execution, index?: number): Execution;
603
604
 
604
605
  serializeBinary(): Uint8Array;
605
- toObject(includeInstance?: boolean): Task.AsObject;
606
- static toObject(includeInstance: boolean, msg: Task): Task.AsObject;
606
+ toObject(includeInstance?: boolean): Task$1.AsObject;
607
+ static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject;
607
608
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
608
609
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
609
- static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void;
610
- static deserializeBinary(bytes: Uint8Array): Task;
611
- static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task;
610
+ static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void;
611
+ static deserializeBinary(bytes: Uint8Array): Task$1;
612
+ static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1;
612
613
  }
613
614
 
614
- declare namespace Task {
615
+ declare namespace Task$1 {
615
616
  export type AsObject = {
616
617
  id?: UUID.AsObject,
617
618
  owner: string,
@@ -1087,18 +1088,18 @@ interface IAggregatorClient {
1087
1088
  ): grpc.ClientUnaryCall;
1088
1089
  getTask(
1089
1090
  request: UUID,
1090
- callback: (error: grpc.ServiceError | null, response: Task) => void
1091
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1091
1092
  ): grpc.ClientUnaryCall;
1092
1093
  getTask(
1093
1094
  request: UUID,
1094
1095
  metadata: grpc.Metadata,
1095
- callback: (error: grpc.ServiceError | null, response: Task) => void
1096
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1096
1097
  ): grpc.ClientUnaryCall;
1097
1098
  getTask(
1098
1099
  request: UUID,
1099
1100
  metadata: grpc.Metadata,
1100
1101
  options: Partial<grpc.CallOptions>,
1101
- callback: (error: grpc.ServiceError | null, response: Task) => void
1102
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1102
1103
  ): grpc.ClientUnaryCall;
1103
1104
  cancelTask(
1104
1105
  request: UUID,
@@ -1335,18 +1336,18 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
1335
1336
  ): grpc.ClientUnaryCall;
1336
1337
  public getTask(
1337
1338
  request: UUID,
1338
- callback: (error: grpc.ServiceError | null, response: Task) => void
1339
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1339
1340
  ): grpc.ClientUnaryCall;
1340
1341
  public getTask(
1341
1342
  request: UUID,
1342
1343
  metadata: grpc.Metadata,
1343
- callback: (error: grpc.ServiceError | null, response: Task) => void
1344
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1344
1345
  ): grpc.ClientUnaryCall;
1345
1346
  public getTask(
1346
1347
  request: UUID,
1347
1348
  metadata: grpc.Metadata,
1348
1349
  options: Partial<grpc.CallOptions>,
1349
- callback: (error: grpc.ServiceError | null, response: Task) => void
1350
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1350
1351
  ): grpc.ClientUnaryCall;
1351
1352
  public cancelTask(
1352
1353
  request: UUID,
@@ -1456,24 +1457,28 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
1456
1457
  }
1457
1458
 
1458
1459
  type Environment = "production" | "development" | "staging";
1459
- interface KeyExchangeResp {
1460
+ declare const AUTH_KEY_HEADER = "authKey";
1461
+ interface GetKeyResponse {
1460
1462
  key: string;
1461
1463
  }
1462
1464
  interface ClientOption {
1463
1465
  endpoint: string;
1464
1466
  jwtApiKey?: string;
1465
1467
  }
1466
- interface TaskResp {
1468
+ interface Task {
1467
1469
  id: string;
1468
1470
  status: string;
1469
1471
  result?: any;
1470
1472
  error?: string;
1471
1473
  }
1472
- interface TaskListResp {
1473
- tasks: TaskResp[];
1474
+ interface CreateTaskResponse {
1475
+ id: string;
1476
+ }
1477
+ interface ListTasksResponse {
1478
+ tasks: Task[];
1474
1479
  }
1475
- interface SmartWalletResp {
1476
- address: string;
1480
+ interface GetAddressesResponse {
1481
+ owner: string;
1477
1482
  smart_account_address: string;
1478
1483
  }
1479
1484
  interface TransactionResp {
@@ -1486,14 +1491,27 @@ interface BalanceResp {
1486
1491
  declare class BaseClient {
1487
1492
  readonly endpoint: string;
1488
1493
  readonly rpcClient: AggregatorClient;
1489
- protected authkey?: string;
1494
+ protected metadata: Metadata;
1490
1495
  constructor(opts: ClientOption);
1491
- authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise<KeyExchangeResp>;
1496
+ setAuthKey(key: string): void;
1497
+ getAuthKey(): string | undefined;
1492
1498
  isAuthenticated(): boolean;
1499
+ authWithAPIKey(apiKey: string, expiredAtEpoch: number): Promise<GetKeyResponse>;
1500
+ authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise<GetKeyResponse>;
1493
1501
  protected _callRPC<TResponse, TRequest>(method: string, request: TRequest | any): Promise<TResponse>;
1494
1502
  }
1495
1503
  declare class Client extends BaseClient {
1496
1504
  constructor(config: ClientOption);
1497
- }
1498
-
1499
- export { type BalanceResp, type ClientOption, type Environment, type KeyExchangeResp, type SmartWalletResp, type TaskListResp, type TaskResp, type TransactionResp, Client as default, getKeyRequestMessage };
1505
+ getAddresses(address: string): Promise<GetAddressesResponse>;
1506
+ createTask({ address, oracleContract, tokenContract, }: {
1507
+ address: string;
1508
+ tokenContract: string;
1509
+ oracleContract: string;
1510
+ }): Promise<CreateTaskResponse>;
1511
+ listTasks(address: string): Promise<ListTasksResponse>;
1512
+ getTask(id: string): Promise<object>;
1513
+ cancelTask(id: string): Promise<boolean>;
1514
+ deleteTask(id: string): Promise<boolean>;
1515
+ }
1516
+
1517
+ export { AUTH_KEY_HEADER, type BalanceResp, type ClientOption, type CreateTaskResponse, type Environment, type GetAddressesResponse, type GetKeyResponse, type ListTasksResponse, type Task, type TransactionResp, Client as default, getKeyRequestMessage };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
+ import { Metadata } from '@grpc/grpc-js';
2
3
  import * as jspb from 'google-protobuf';
3
4
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
4
5
  import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb';
@@ -565,53 +566,53 @@ declare namespace Execution {
565
566
  }
566
567
  }
567
568
 
568
- declare class Task extends jspb.Message {
569
+ declare class Task$1 extends jspb.Message {
569
570
 
570
571
  hasId(): boolean;
571
572
  clearId(): void;
572
573
  getId(): UUID | undefined;
573
- setId(value?: UUID): Task;
574
+ setId(value?: UUID): Task$1;
574
575
  getOwner(): string;
575
- setOwner(value: string): Task;
576
+ setOwner(value: string): Task$1;
576
577
  getSmartAccountAddress(): string;
577
- setSmartAccountAddress(value: string): Task;
578
+ setSmartAccountAddress(value: string): Task$1;
578
579
 
579
580
  hasTrigger(): boolean;
580
581
  clearTrigger(): void;
581
582
  getTrigger(): TaskTrigger | undefined;
582
- setTrigger(value?: TaskTrigger): Task;
583
+ setTrigger(value?: TaskTrigger): Task$1;
583
584
  clearNodesList(): void;
584
585
  getNodesList(): Array<TaskAction>;
585
- setNodesList(value: Array<TaskAction>): Task;
586
+ setNodesList(value: Array<TaskAction>): Task$1;
586
587
  addNodes(value?: TaskAction, index?: number): TaskAction;
587
588
  getStartAt(): number;
588
- setStartAt(value: number): Task;
589
+ setStartAt(value: number): Task$1;
589
590
  getExpiredAt(): number;
590
- setExpiredAt(value: number): Task;
591
+ setExpiredAt(value: number): Task$1;
591
592
  getMemo(): string;
592
- setMemo(value: string): Task;
593
+ setMemo(value: string): Task$1;
593
594
  getCompletedAt(): number;
594
- setCompletedAt(value: number): Task;
595
+ setCompletedAt(value: number): Task$1;
595
596
  getStatus(): TaskStatus;
596
- setStatus(value: TaskStatus): Task;
597
+ setStatus(value: TaskStatus): Task$1;
597
598
  getRepeatable(): boolean;
598
- setRepeatable(value: boolean): Task;
599
+ setRepeatable(value: boolean): Task$1;
599
600
  clearExecutionsList(): void;
600
601
  getExecutionsList(): Array<Execution>;
601
- setExecutionsList(value: Array<Execution>): Task;
602
+ setExecutionsList(value: Array<Execution>): Task$1;
602
603
  addExecutions(value?: Execution, index?: number): Execution;
603
604
 
604
605
  serializeBinary(): Uint8Array;
605
- toObject(includeInstance?: boolean): Task.AsObject;
606
- static toObject(includeInstance: boolean, msg: Task): Task.AsObject;
606
+ toObject(includeInstance?: boolean): Task$1.AsObject;
607
+ static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject;
607
608
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
608
609
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
609
- static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void;
610
- static deserializeBinary(bytes: Uint8Array): Task;
611
- static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task;
610
+ static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void;
611
+ static deserializeBinary(bytes: Uint8Array): Task$1;
612
+ static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1;
612
613
  }
613
614
 
614
- declare namespace Task {
615
+ declare namespace Task$1 {
615
616
  export type AsObject = {
616
617
  id?: UUID.AsObject,
617
618
  owner: string,
@@ -1087,18 +1088,18 @@ interface IAggregatorClient {
1087
1088
  ): grpc.ClientUnaryCall;
1088
1089
  getTask(
1089
1090
  request: UUID,
1090
- callback: (error: grpc.ServiceError | null, response: Task) => void
1091
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1091
1092
  ): grpc.ClientUnaryCall;
1092
1093
  getTask(
1093
1094
  request: UUID,
1094
1095
  metadata: grpc.Metadata,
1095
- callback: (error: grpc.ServiceError | null, response: Task) => void
1096
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1096
1097
  ): grpc.ClientUnaryCall;
1097
1098
  getTask(
1098
1099
  request: UUID,
1099
1100
  metadata: grpc.Metadata,
1100
1101
  options: Partial<grpc.CallOptions>,
1101
- callback: (error: grpc.ServiceError | null, response: Task) => void
1102
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1102
1103
  ): grpc.ClientUnaryCall;
1103
1104
  cancelTask(
1104
1105
  request: UUID,
@@ -1335,18 +1336,18 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
1335
1336
  ): grpc.ClientUnaryCall;
1336
1337
  public getTask(
1337
1338
  request: UUID,
1338
- callback: (error: grpc.ServiceError | null, response: Task) => void
1339
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1339
1340
  ): grpc.ClientUnaryCall;
1340
1341
  public getTask(
1341
1342
  request: UUID,
1342
1343
  metadata: grpc.Metadata,
1343
- callback: (error: grpc.ServiceError | null, response: Task) => void
1344
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1344
1345
  ): grpc.ClientUnaryCall;
1345
1346
  public getTask(
1346
1347
  request: UUID,
1347
1348
  metadata: grpc.Metadata,
1348
1349
  options: Partial<grpc.CallOptions>,
1349
- callback: (error: grpc.ServiceError | null, response: Task) => void
1350
+ callback: (error: grpc.ServiceError | null, response: Task$1) => void
1350
1351
  ): grpc.ClientUnaryCall;
1351
1352
  public cancelTask(
1352
1353
  request: UUID,
@@ -1456,24 +1457,28 @@ declare class AggregatorClient extends grpc.Client implements IAggregatorClient
1456
1457
  }
1457
1458
 
1458
1459
  type Environment = "production" | "development" | "staging";
1459
- interface KeyExchangeResp {
1460
+ declare const AUTH_KEY_HEADER = "authKey";
1461
+ interface GetKeyResponse {
1460
1462
  key: string;
1461
1463
  }
1462
1464
  interface ClientOption {
1463
1465
  endpoint: string;
1464
1466
  jwtApiKey?: string;
1465
1467
  }
1466
- interface TaskResp {
1468
+ interface Task {
1467
1469
  id: string;
1468
1470
  status: string;
1469
1471
  result?: any;
1470
1472
  error?: string;
1471
1473
  }
1472
- interface TaskListResp {
1473
- tasks: TaskResp[];
1474
+ interface CreateTaskResponse {
1475
+ id: string;
1476
+ }
1477
+ interface ListTasksResponse {
1478
+ tasks: Task[];
1474
1479
  }
1475
- interface SmartWalletResp {
1476
- address: string;
1480
+ interface GetAddressesResponse {
1481
+ owner: string;
1477
1482
  smart_account_address: string;
1478
1483
  }
1479
1484
  interface TransactionResp {
@@ -1486,14 +1491,27 @@ interface BalanceResp {
1486
1491
  declare class BaseClient {
1487
1492
  readonly endpoint: string;
1488
1493
  readonly rpcClient: AggregatorClient;
1489
- protected authkey?: string;
1494
+ protected metadata: Metadata;
1490
1495
  constructor(opts: ClientOption);
1491
- authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise<KeyExchangeResp>;
1496
+ setAuthKey(key: string): void;
1497
+ getAuthKey(): string | undefined;
1492
1498
  isAuthenticated(): boolean;
1499
+ authWithAPIKey(apiKey: string, expiredAtEpoch: number): Promise<GetKeyResponse>;
1500
+ authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise<GetKeyResponse>;
1493
1501
  protected _callRPC<TResponse, TRequest>(method: string, request: TRequest | any): Promise<TResponse>;
1494
1502
  }
1495
1503
  declare class Client extends BaseClient {
1496
1504
  constructor(config: ClientOption);
1497
- }
1498
-
1499
- export { type BalanceResp, type ClientOption, type Environment, type KeyExchangeResp, type SmartWalletResp, type TaskListResp, type TaskResp, type TransactionResp, Client as default, getKeyRequestMessage };
1505
+ getAddresses(address: string): Promise<GetAddressesResponse>;
1506
+ createTask({ address, oracleContract, tokenContract, }: {
1507
+ address: string;
1508
+ tokenContract: string;
1509
+ oracleContract: string;
1510
+ }): Promise<CreateTaskResponse>;
1511
+ listTasks(address: string): Promise<ListTasksResponse>;
1512
+ getTask(id: string): Promise<object>;
1513
+ cancelTask(id: string): Promise<boolean>;
1514
+ deleteTask(id: string): Promise<boolean>;
1515
+ }
1516
+
1517
+ export { AUTH_KEY_HEADER, type BalanceResp, type ClientOption, type CreateTaskResponse, type Environment, type GetAddressesResponse, type GetKeyResponse, type ListTasksResponse, type Task, type TransactionResp, Client as default, getKeyRequestMessage };