@rabby-wallet/rabby-api 0.9.58-alpha-1 → 0.9.58-alpha-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/dist/index.d.ts CHANGED
@@ -44,6 +44,16 @@ declare type GnosisSafeTxGasOptions = GnosisSafeRequestOptions & {
44
44
  operation?: number;
45
45
  };
46
46
  };
47
+ declare type GnosisGetSafeMessagesOptions = GnosisSafeRequestOptions & {
48
+ options?: Record<string, any>;
49
+ };
50
+ declare type GnosisAddSafeMessageOptions = GnosisSafeRequestOptions & {
51
+ data: {
52
+ message: string | Record<string, any>;
53
+ signature: string;
54
+ safeAppId?: number;
55
+ };
56
+ };
47
57
  export declare class OpenApiService {
48
58
  #private;
49
59
  store: OpenApiStore;
@@ -75,6 +85,10 @@ export declare class OpenApiService {
75
85
  getSafeInfo: ({ txServiceUrl, safeAddress, }: GnosisSafeRequestOptions) => Promise<any>;
76
86
  confirmSafeTransaction: ({ txServiceUrl, safeTransactionHash, data, }: GnosisConfirmTransactionOptions) => Promise<void>;
77
87
  getSafeTxGas: ({ txServiceUrl, safeAddress, safeTxData, }: GnosisSafeTxGasOptions) => Promise<string | undefined>;
88
+ getSafeMessages: ({ txServiceUrl, safeAddress, options, }: GnosisGetSafeMessagesOptions) => Promise<{
89
+ results: any[];
90
+ }>;
91
+ addSafeMessage: ({ txServiceUrl, safeAddress, data, }: GnosisAddSafeMessageOptions) => Promise<void>;
78
92
  asyncJob: <T = any>(url: string, options?: AxiosRequestConfig & {
79
93
  retryDelay?: number;
80
94
  }) => Promise<T>;
package/dist/index.js CHANGED
@@ -117,6 +117,15 @@ export class OpenApiService {
117
117
  });
118
118
  return data === null || data === void 0 ? void 0 : data.safeTxGas;
119
119
  });
120
+ this.getSafeMessages = ({ txServiceUrl, safeAddress, options, }) => __awaiter(this, void 0, void 0, function* () {
121
+ const { data } = yield this.request.get(`${txServiceUrl}/v1/safes/${safeAddress}/messages/`, {
122
+ params: options,
123
+ });
124
+ return data;
125
+ });
126
+ this.addSafeMessage = ({ txServiceUrl, safeAddress, data, }) => __awaiter(this, void 0, void 0, function* () {
127
+ yield this.request.post(`${txServiceUrl}/v1/safes/${safeAddress}/messages/`, data);
128
+ });
120
129
  this.asyncJob = (url, options) => {
121
130
  const _option = Object.assign({ timeout: ASYNC_JOB_TIMEOUT, retryDelay: ASYNC_JOB_RETRY_DELAY }, options);
122
131
  const startTime = +new Date();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.58-alpha-1",
3
+ "version": "0.9.58-alpha-2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [