@msafe/sui3-sdk 0.0.9 → 0.0.10

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.
@@ -0,0 +1,32 @@
1
+ import { PagedResult } from '@/types/pagination';
2
+
3
+ export enum OpAddressBookType {
4
+ Delete = 'delete',
5
+ Upsert = 'upsert',
6
+ }
7
+
8
+ export type UpdateAddressBookEntry = DeleteAddressBookEntry | UpsertAddressBookEntry;
9
+
10
+ export interface DeleteAddressBookEntry {
11
+ opType: OpAddressBookType.Delete;
12
+ address: string;
13
+ }
14
+
15
+ export interface UpsertAddressBookEntry {
16
+ opType: OpAddressBookType.Upsert;
17
+ address: string;
18
+ addressName: string;
19
+ remark?: string;
20
+ }
21
+
22
+ export type GetAddressBookResult = PagedResult<GetAddressBookResultEntry>;
23
+
24
+ export interface GetAddressBookResultEntry {
25
+ address: string;
26
+
27
+ addressName: string;
28
+
29
+ remark?: string;
30
+
31
+ updatedAt: Date;
32
+ }
@@ -2,7 +2,7 @@ export type JWTToken = string;
2
2
 
3
3
  export interface PaginationOption {
4
4
  page?: number;
5
- pageSize: number;
5
+ limit?: number;
6
6
  }
7
7
 
8
8
  export interface PaginationResponse<T> {
@@ -1,3 +1,6 @@
1
1
  export * from './creation';
2
2
  export * from './msafe';
3
3
  export * from './wallet';
4
+ export * from './pagination';
5
+ export * from './address-book';
6
+ export * from './backend';
@@ -0,0 +1,15 @@
1
+ export interface PagedResult<T> {
2
+ data: T[];
3
+
4
+ meta: PagedMeta;
5
+ }
6
+
7
+ export interface PagedMeta {
8
+ page: number;
9
+
10
+ limit: number;
11
+
12
+ total: number;
13
+
14
+ hasNext: boolean;
15
+ }