@0xobelisk/client 0.2.9 → 0.3.0
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/package.json +1 -1
- package/dist/framework/bcs.d.ts +0 -3
- package/dist/framework/loader.d.ts +0 -11
- package/dist/framework/util.d.ts +0 -90
- package/dist/index.d.ts +0 -9
- package/dist/libs/suiAccountManager/crypto.d.ts +0 -1
- package/dist/libs/suiAccountManager/index.d.ts +0 -35
- package/dist/libs/suiAccountManager/keypair.d.ts +0 -21
- package/dist/libs/suiAccountManager/types.d.ts +0 -9
- package/dist/libs/suiAccountManager/util.d.ts +0 -29
- package/dist/libs/suiContractFactory/index.d.ts +0 -20
- package/dist/libs/suiContractFactory/types.d.ts +0 -49
- package/dist/libs/suiInteractor/defaultConfig.d.ts +0 -10
- package/dist/libs/suiInteractor/index.d.ts +0 -2
- package/dist/libs/suiInteractor/suiInteractor.d.ts +0 -205
- package/dist/libs/suiInteractor/util.d.ts +0 -1
- package/dist/libs/suiModel/index.d.ts +0 -2
- package/dist/libs/suiModel/suiOwnedObject.d.ts +0 -24
- package/dist/libs/suiModel/suiSharedObject.d.ts +0 -12
- package/dist/libs/suiRpcProvider/defaultChainConfigs.d.ts +0 -8
- package/dist/libs/suiRpcProvider/faucet.d.ts +0 -8
- package/dist/libs/suiRpcProvider/index.d.ts +0 -213
- package/dist/libs/suiRpcProvider/types.d.ts +0 -14
- package/dist/libs/suiTxBuilder/index.d.ts +0 -544
- package/dist/libs/suiTxBuilder/types.d.ts +0 -12
- package/dist/libs/suiTxBuilder/util.d.ts +0 -76
- package/dist/metadata/index.d.ts +0 -34
- package/dist/obelisk.d.ts +0 -2759
- package/dist/types/index.d.ts +0 -135
- package/dist/utils/index.d.ts +0 -3
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { JsonRpcProvider, DynamicFieldName, SuiAddress } from '@mysten/sui.js';
|
|
2
|
-
import type { ObjectData, SuiRpcProviderParams } from './types';
|
|
3
|
-
export declare class SuiRpcProvider {
|
|
4
|
-
fullnodeUrl: string;
|
|
5
|
-
faucetUrl?: string;
|
|
6
|
-
provider: JsonRpcProvider;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param networkType, 'testnet' | 'mainnet' | 'devnet' | 'localnet', default is 'devnet'
|
|
10
|
-
* @param fullnodeUrl, the fullnode url, default is the preconfig fullnode url for the given network type
|
|
11
|
-
* @param faucetUrl, the faucet url, default is the preconfig faucet url for the given network type
|
|
12
|
-
*/
|
|
13
|
-
constructor({ fullnodeUrl, faucetUrl, networkType, }?: SuiRpcProviderParams);
|
|
14
|
-
/**
|
|
15
|
-
* Request some SUI from faucet
|
|
16
|
-
* @Returns {Promise<boolean>}, true if the request is successful, false otherwise.
|
|
17
|
-
*/
|
|
18
|
-
requestFaucet(addr: string): Promise<void>;
|
|
19
|
-
getBalance(addr: string, coinType?: string): Promise<{
|
|
20
|
-
coinType: string;
|
|
21
|
-
coinObjectCount: number;
|
|
22
|
-
totalBalance: string;
|
|
23
|
-
lockedBalance: {
|
|
24
|
-
number?: number | undefined;
|
|
25
|
-
epochId?: number | undefined;
|
|
26
|
-
};
|
|
27
|
-
}>;
|
|
28
|
-
getDynamicFieldObject(parentId: string, name: string | DynamicFieldName): Promise<{
|
|
29
|
-
data?: {
|
|
30
|
-
objectId: string;
|
|
31
|
-
version: string;
|
|
32
|
-
digest: string;
|
|
33
|
-
type?: string | undefined;
|
|
34
|
-
bcs?: {
|
|
35
|
-
type: string;
|
|
36
|
-
version: number;
|
|
37
|
-
hasPublicTransfer: boolean;
|
|
38
|
-
dataType: "moveObject";
|
|
39
|
-
bcsBytes: string;
|
|
40
|
-
} | {
|
|
41
|
-
id: string;
|
|
42
|
-
dataType: "package";
|
|
43
|
-
moduleMap: Record<string, string>;
|
|
44
|
-
} | undefined;
|
|
45
|
-
owner?: {
|
|
46
|
-
AddressOwner: string;
|
|
47
|
-
} | {
|
|
48
|
-
ObjectOwner: string;
|
|
49
|
-
} | {
|
|
50
|
-
Shared: {
|
|
51
|
-
initial_shared_version: number;
|
|
52
|
-
};
|
|
53
|
-
} | "Immutable" | undefined;
|
|
54
|
-
storageRebate?: string | undefined;
|
|
55
|
-
previousTransaction?: string | undefined;
|
|
56
|
-
content?: {
|
|
57
|
-
type: string;
|
|
58
|
-
fields: Record<string, any>;
|
|
59
|
-
hasPublicTransfer: boolean;
|
|
60
|
-
dataType: "moveObject";
|
|
61
|
-
} | {
|
|
62
|
-
disassembled: Record<string, string>;
|
|
63
|
-
dataType: "package";
|
|
64
|
-
} | undefined;
|
|
65
|
-
display?: Record<string, string> | {
|
|
66
|
-
data: Record<string, string> | null;
|
|
67
|
-
error: {
|
|
68
|
-
code: string;
|
|
69
|
-
version?: number | undefined;
|
|
70
|
-
digest?: string | undefined;
|
|
71
|
-
error?: string | undefined;
|
|
72
|
-
object_id?: string | undefined;
|
|
73
|
-
parent_object_id?: string | undefined;
|
|
74
|
-
} | null;
|
|
75
|
-
} | undefined;
|
|
76
|
-
} | undefined;
|
|
77
|
-
error?: {
|
|
78
|
-
code: string;
|
|
79
|
-
version?: number | undefined;
|
|
80
|
-
digest?: string | undefined;
|
|
81
|
-
error?: string | undefined;
|
|
82
|
-
object_id?: string | undefined;
|
|
83
|
-
parent_object_id?: string | undefined;
|
|
84
|
-
} | undefined;
|
|
85
|
-
}>;
|
|
86
|
-
getDynamicFields(parentId: string, cursor?: string, limit?: number): Promise<{
|
|
87
|
-
data: {
|
|
88
|
-
type: "DynamicField" | "DynamicObject";
|
|
89
|
-
objectType: string;
|
|
90
|
-
objectId: string;
|
|
91
|
-
version: number;
|
|
92
|
-
digest: string;
|
|
93
|
-
name: {
|
|
94
|
-
type: string;
|
|
95
|
-
value?: any;
|
|
96
|
-
};
|
|
97
|
-
bcsName: string;
|
|
98
|
-
}[];
|
|
99
|
-
nextCursor: string | null;
|
|
100
|
-
hasNextPage: boolean;
|
|
101
|
-
}>;
|
|
102
|
-
getOwnedObjects(owner: SuiAddress, cursor?: string, limit?: number): Promise<{
|
|
103
|
-
data: {
|
|
104
|
-
data?: {
|
|
105
|
-
objectId: string;
|
|
106
|
-
version: string;
|
|
107
|
-
digest: string;
|
|
108
|
-
type?: string | undefined;
|
|
109
|
-
bcs?: {
|
|
110
|
-
type: string;
|
|
111
|
-
version: number;
|
|
112
|
-
hasPublicTransfer: boolean;
|
|
113
|
-
dataType: "moveObject";
|
|
114
|
-
bcsBytes: string;
|
|
115
|
-
} | {
|
|
116
|
-
id: string;
|
|
117
|
-
dataType: "package";
|
|
118
|
-
moduleMap: Record<string, string>;
|
|
119
|
-
} | undefined;
|
|
120
|
-
owner?: "Immutable" | {
|
|
121
|
-
AddressOwner: string;
|
|
122
|
-
} | {
|
|
123
|
-
ObjectOwner: string;
|
|
124
|
-
} | {
|
|
125
|
-
Shared: {
|
|
126
|
-
initial_shared_version: number;
|
|
127
|
-
};
|
|
128
|
-
} | undefined;
|
|
129
|
-
storageRebate?: string | undefined;
|
|
130
|
-
previousTransaction?: string | undefined;
|
|
131
|
-
content?: {
|
|
132
|
-
type: string;
|
|
133
|
-
fields: Record<string, any>;
|
|
134
|
-
hasPublicTransfer: boolean;
|
|
135
|
-
dataType: "moveObject";
|
|
136
|
-
} | {
|
|
137
|
-
disassembled: Record<string, string>;
|
|
138
|
-
dataType: "package";
|
|
139
|
-
} | undefined;
|
|
140
|
-
display?: Record<string, string> | {
|
|
141
|
-
data: Record<string, string> | null;
|
|
142
|
-
error: {
|
|
143
|
-
code: string;
|
|
144
|
-
version?: number | undefined;
|
|
145
|
-
digest?: string | undefined;
|
|
146
|
-
error?: string | undefined;
|
|
147
|
-
object_id?: string | undefined;
|
|
148
|
-
parent_object_id?: string | undefined;
|
|
149
|
-
} | null;
|
|
150
|
-
} | undefined;
|
|
151
|
-
} | undefined;
|
|
152
|
-
error?: {
|
|
153
|
-
code: string;
|
|
154
|
-
version?: number | undefined;
|
|
155
|
-
digest?: string | undefined;
|
|
156
|
-
error?: string | undefined;
|
|
157
|
-
object_id?: string | undefined;
|
|
158
|
-
parent_object_id?: string | undefined;
|
|
159
|
-
} | undefined;
|
|
160
|
-
}[];
|
|
161
|
-
nextCursor: string | {
|
|
162
|
-
objectId: string;
|
|
163
|
-
atCheckpoint?: number | undefined;
|
|
164
|
-
} | null;
|
|
165
|
-
hasNextPage: boolean;
|
|
166
|
-
}>;
|
|
167
|
-
getObject(id: string): Promise<ObjectData>;
|
|
168
|
-
getObjects(ids: string[]): Promise<ObjectData[]>;
|
|
169
|
-
getNormalizedMoveModulesByPackage(packageId: string): Promise<Record<string, {
|
|
170
|
-
address: string;
|
|
171
|
-
name: string;
|
|
172
|
-
fileFormatVersion: number;
|
|
173
|
-
friends: {
|
|
174
|
-
address: string;
|
|
175
|
-
name: string;
|
|
176
|
-
}[];
|
|
177
|
-
structs: Record<string, {
|
|
178
|
-
fields: {
|
|
179
|
-
type: import("@mysten/sui.js").SuiMoveNormalizedType;
|
|
180
|
-
name: string;
|
|
181
|
-
}[];
|
|
182
|
-
abilities: {
|
|
183
|
-
abilities: string[];
|
|
184
|
-
};
|
|
185
|
-
typeParameters: {
|
|
186
|
-
constraints: {
|
|
187
|
-
abilities: string[];
|
|
188
|
-
};
|
|
189
|
-
isPhantom: boolean;
|
|
190
|
-
}[];
|
|
191
|
-
}>;
|
|
192
|
-
exposedFunctions: Record<string, {
|
|
193
|
-
visibility: "Private" | "Public" | "Friend";
|
|
194
|
-
isEntry: boolean;
|
|
195
|
-
typeParameters: {
|
|
196
|
-
abilities: string[];
|
|
197
|
-
}[];
|
|
198
|
-
parameters: import("@mysten/sui.js").SuiMoveNormalizedType[];
|
|
199
|
-
return: import("@mysten/sui.js").SuiMoveNormalizedType[];
|
|
200
|
-
}>;
|
|
201
|
-
}>>;
|
|
202
|
-
/**
|
|
203
|
-
* @description Select coins that add up to the given amount.
|
|
204
|
-
* @param addr the address of the owner
|
|
205
|
-
* @param amount the amount that is needed for the coin
|
|
206
|
-
* @param coinType the coin type, default is '0x2::SUI::SUI'
|
|
207
|
-
*/
|
|
208
|
-
selectCoins(addr: string, amount: number, coinType?: string): Promise<{
|
|
209
|
-
objectId: string;
|
|
210
|
-
digest: string;
|
|
211
|
-
version: string;
|
|
212
|
-
}[]>;
|
|
213
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DisplayFieldsResponse, ObjectContentFields } from '@mysten/sui.js';
|
|
2
|
-
export type NetworkType = 'testnet' | 'mainnet' | 'devnet' | 'localnet';
|
|
3
|
-
export type ObjectData = {
|
|
4
|
-
objectId: string;
|
|
5
|
-
objectType: string;
|
|
6
|
-
objectVersion: number;
|
|
7
|
-
objectDisplay: DisplayFieldsResponse;
|
|
8
|
-
objectFields: ObjectContentFields;
|
|
9
|
-
};
|
|
10
|
-
export type SuiRpcProviderParams = {
|
|
11
|
-
fullnodeUrl?: string;
|
|
12
|
-
faucetUrl?: string;
|
|
13
|
-
networkType?: NetworkType;
|
|
14
|
-
};
|