@rabby-wallet/rabby-api 0.9.58-alpha-2 → 0.9.58-alpha-3

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
@@ -54,6 +54,13 @@ declare type GnosisAddSafeMessageOptions = GnosisSafeRequestOptions & {
54
54
  safeAppId?: number;
55
55
  };
56
56
  };
57
+ declare type GnosisGetSafeMessageOptions = GnosisRequestOptions & {
58
+ messageHash: string;
59
+ };
60
+ declare type GnosisAddSafeMessageSignatureOptions = GnosisRequestOptions & {
61
+ messageHash: string;
62
+ signature: string;
63
+ };
57
64
  export declare class OpenApiService {
58
65
  #private;
59
66
  store: OpenApiStore;
@@ -89,6 +96,8 @@ export declare class OpenApiService {
89
96
  results: any[];
90
97
  }>;
91
98
  addSafeMessage: ({ txServiceUrl, safeAddress, data, }: GnosisAddSafeMessageOptions) => Promise<void>;
99
+ getSafeMessage: ({ txServiceUrl, messageHash, }: GnosisGetSafeMessageOptions) => Promise<any>;
100
+ addSafeMessageSignature: ({ txServiceUrl, messageHash, signature, }: GnosisAddSafeMessageSignatureOptions) => Promise<void>;
92
101
  asyncJob: <T = any>(url: string, options?: AxiosRequestConfig & {
93
102
  retryDelay?: number;
94
103
  }) => Promise<T>;
package/dist/index.js CHANGED
@@ -126,6 +126,15 @@ export class OpenApiService {
126
126
  this.addSafeMessage = ({ txServiceUrl, safeAddress, data, }) => __awaiter(this, void 0, void 0, function* () {
127
127
  yield this.request.post(`${txServiceUrl}/v1/safes/${safeAddress}/messages/`, data);
128
128
  });
129
+ this.getSafeMessage = ({ txServiceUrl, messageHash, }) => __awaiter(this, void 0, void 0, function* () {
130
+ const { data } = yield this.request.get(`${txServiceUrl}/v1/messages/${messageHash}/`);
131
+ return data;
132
+ });
133
+ this.addSafeMessageSignature = ({ txServiceUrl, messageHash, signature, }) => __awaiter(this, void 0, void 0, function* () {
134
+ yield this.request.post(`${txServiceUrl}/v1/messages/${messageHash}/signatures/`, {
135
+ signature,
136
+ });
137
+ });
129
138
  this.asyncJob = (url, options) => {
130
139
  const _option = Object.assign({ timeout: ASYNC_JOB_TIMEOUT, retryDelay: ASYNC_JOB_RETRY_DELAY }, options);
131
140
  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-2",
3
+ "version": "0.9.58-alpha-3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [