@clonegod/ttd-sui-common 1.0.77 → 1.0.78
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GrpcConnection } from './grpc-connection';
|
|
2
|
+
import { ListOwnedObjectsResponse } from '../type/sui_object_types';
|
|
2
3
|
export declare class LiveDataService {
|
|
3
4
|
private liveDataClient;
|
|
4
5
|
private connection;
|
|
@@ -6,5 +7,5 @@ export declare class LiveDataService {
|
|
|
6
7
|
getBalance(owner: string, coinType: string): Promise<any>;
|
|
7
8
|
listBalances(owner: string): Promise<unknown>;
|
|
8
9
|
getCoinInfo(coinType: string): Promise<unknown>;
|
|
9
|
-
listOwnedObjects(owner: string, coinType?: string, limit?: number, readMask?: string[]): Promise<
|
|
10
|
+
listOwnedObjects(owner: string, coinType?: string, limit?: number, readMask?: string[]): Promise<ListOwnedObjectsResponse>;
|
|
10
11
|
}
|
package/dist/type/index.d.ts
CHANGED
package/dist/type/index.js
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface SuiObjectOwner {
|
|
2
|
+
kind: 'ADDRESS' | 'OBJECT' | 'SHARED' | 'IMMUTABLE';
|
|
3
|
+
address?: string;
|
|
4
|
+
object_id?: string;
|
|
5
|
+
initial_shared_version?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SuiObjectData {
|
|
8
|
+
object_id: string;
|
|
9
|
+
_object_id: string;
|
|
10
|
+
version: string;
|
|
11
|
+
_version: string;
|
|
12
|
+
digest: string;
|
|
13
|
+
_digest: string;
|
|
14
|
+
owner: SuiObjectOwner;
|
|
15
|
+
_owner: string;
|
|
16
|
+
object_type: string;
|
|
17
|
+
_object_type: string;
|
|
18
|
+
storage_rebate: string;
|
|
19
|
+
_storage_rebate: string;
|
|
20
|
+
balance: string;
|
|
21
|
+
_balance: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ListOwnedObjectsResponse {
|
|
24
|
+
objects: SuiObjectData[];
|
|
25
|
+
next_cursor?: string;
|
|
26
|
+
has_next_page?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface SimplifiedSuiObject {
|
|
29
|
+
objectId: string;
|
|
30
|
+
version: string;
|
|
31
|
+
digest: string;
|
|
32
|
+
raw_balance: string;
|
|
33
|
+
}
|
|
34
|
+
export declare enum SuiObjectKind {
|
|
35
|
+
ADDRESS = "ADDRESS",
|
|
36
|
+
OBJECT = "OBJECT",
|
|
37
|
+
SHARED = "SHARED",
|
|
38
|
+
IMMUTABLE = "IMMUTABLE"
|
|
39
|
+
}
|
|
40
|
+
export declare enum SuiObjectStatus {
|
|
41
|
+
EXISTS = "EXISTS",
|
|
42
|
+
NOT_EXISTS = "NOT_EXISTS",
|
|
43
|
+
DELETED = "DELETED"
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SuiObjectStatus = exports.SuiObjectKind = void 0;
|
|
4
|
+
var SuiObjectKind;
|
|
5
|
+
(function (SuiObjectKind) {
|
|
6
|
+
SuiObjectKind["ADDRESS"] = "ADDRESS";
|
|
7
|
+
SuiObjectKind["OBJECT"] = "OBJECT";
|
|
8
|
+
SuiObjectKind["SHARED"] = "SHARED";
|
|
9
|
+
SuiObjectKind["IMMUTABLE"] = "IMMUTABLE";
|
|
10
|
+
})(SuiObjectKind || (exports.SuiObjectKind = SuiObjectKind = {}));
|
|
11
|
+
var SuiObjectStatus;
|
|
12
|
+
(function (SuiObjectStatus) {
|
|
13
|
+
SuiObjectStatus["EXISTS"] = "EXISTS";
|
|
14
|
+
SuiObjectStatus["NOT_EXISTS"] = "NOT_EXISTS";
|
|
15
|
+
SuiObjectStatus["DELETED"] = "DELETED";
|
|
16
|
+
})(SuiObjectStatus || (exports.SuiObjectStatus = SuiObjectStatus = {}));
|