@bitgo-beta/sdk-coin-sui 0.0.0-semantic-release-managed

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.
Files changed (165) hide show
  1. package/.eslintignore +6 -0
  2. package/.mocharc.yml +7 -0
  3. package/CHANGELOG.md +1152 -0
  4. package/LICENSE +191 -0
  5. package/README.md +30 -0
  6. package/dist/src/index.d.ts +6 -0
  7. package/dist/src/index.d.ts.map +1 -0
  8. package/dist/src/index.js +22 -0
  9. package/dist/src/lib/compareTransactionBlocks.d.ts +8 -0
  10. package/dist/src/lib/compareTransactionBlocks.d.ts.map +1 -0
  11. package/dist/src/lib/compareTransactionBlocks.js +12 -0
  12. package/dist/src/lib/constants.d.ts +17 -0
  13. package/dist/src/lib/constants.d.ts.map +1 -0
  14. package/dist/src/lib/constants.js +30 -0
  15. package/dist/src/lib/customTransaction.d.ts +57 -0
  16. package/dist/src/lib/customTransaction.d.ts.map +1 -0
  17. package/dist/src/lib/customTransaction.js +159 -0
  18. package/dist/src/lib/customTransactionBuilder.d.ts +46 -0
  19. package/dist/src/lib/customTransactionBuilder.d.ts.map +1 -0
  20. package/dist/src/lib/customTransactionBuilder.js +117 -0
  21. package/dist/src/lib/iface.d.ts +131 -0
  22. package/dist/src/lib/iface.d.ts.map +1 -0
  23. package/dist/src/lib/iface.js +63 -0
  24. package/dist/src/lib/index.d.ts +22 -0
  25. package/dist/src/lib/index.d.ts.map +1 -0
  26. package/dist/src/lib/index.js +77 -0
  27. package/dist/src/lib/keyPair.d.ts +29 -0
  28. package/dist/src/lib/keyPair.d.ts.map +1 -0
  29. package/dist/src/lib/keyPair.js +97 -0
  30. package/dist/src/lib/mystenlab/builder/Inputs.d.ts +66 -0
  31. package/dist/src/lib/mystenlab/builder/Inputs.d.ts.map +1 -0
  32. package/dist/src/lib/mystenlab/builder/Inputs.js +55 -0
  33. package/dist/src/lib/mystenlab/builder/TransactionBlock.d.ts +302 -0
  34. package/dist/src/lib/mystenlab/builder/TransactionBlock.d.ts.map +1 -0
  35. package/dist/src/lib/mystenlab/builder/TransactionBlock.js +255 -0
  36. package/dist/src/lib/mystenlab/builder/TransactionDataBlock.d.ts +566 -0
  37. package/dist/src/lib/mystenlab/builder/TransactionDataBlock.d.ts.map +1 -0
  38. package/dist/src/lib/mystenlab/builder/TransactionDataBlock.js +168 -0
  39. package/dist/src/lib/mystenlab/builder/Transactions.d.ts +937 -0
  40. package/dist/src/lib/mystenlab/builder/Transactions.d.ts.map +1 -0
  41. package/dist/src/lib/mystenlab/builder/Transactions.js +118 -0
  42. package/dist/src/lib/mystenlab/builder/bcs.d.ts +25 -0
  43. package/dist/src/lib/mystenlab/builder/bcs.d.ts.map +1 -0
  44. package/dist/src/lib/mystenlab/builder/bcs.js +141 -0
  45. package/dist/src/lib/mystenlab/builder/index.d.ts +5 -0
  46. package/dist/src/lib/mystenlab/builder/index.d.ts.map +1 -0
  47. package/dist/src/lib/mystenlab/builder/index.js +21 -0
  48. package/dist/src/lib/mystenlab/builder/serializer.d.ts +4 -0
  49. package/dist/src/lib/mystenlab/builder/serializer.d.ts.map +1 -0
  50. package/dist/src/lib/mystenlab/builder/serializer.js +99 -0
  51. package/dist/src/lib/mystenlab/builder/utils.d.ts +10 -0
  52. package/dist/src/lib/mystenlab/builder/utils.d.ts.map +1 -0
  53. package/dist/src/lib/mystenlab/builder/utils.js +10 -0
  54. package/dist/src/lib/mystenlab/cryptography/hash.d.ts +8 -0
  55. package/dist/src/lib/mystenlab/cryptography/hash.d.ts.map +1 -0
  56. package/dist/src/lib/mystenlab/cryptography/hash.js +21 -0
  57. package/dist/src/lib/mystenlab/framework/framework.d.ts +93 -0
  58. package/dist/src/lib/mystenlab/framework/framework.d.ts.map +1 -0
  59. package/dist/src/lib/mystenlab/framework/framework.js +135 -0
  60. package/dist/src/lib/mystenlab/framework/index.d.ts +3 -0
  61. package/dist/src/lib/mystenlab/framework/index.d.ts.map +1 -0
  62. package/dist/src/lib/mystenlab/framework/index.js +19 -0
  63. package/dist/src/lib/mystenlab/framework/sui-system-state.d.ts +14 -0
  64. package/dist/src/lib/mystenlab/framework/sui-system-state.d.ts.map +1 -0
  65. package/dist/src/lib/mystenlab/framework/sui-system-state.js +22 -0
  66. package/dist/src/lib/mystenlab/txn-data-serializers/type-tag-serializer.d.ts +7 -0
  67. package/dist/src/lib/mystenlab/txn-data-serializers/type-tag-serializer.d.ts.map +1 -0
  68. package/dist/src/lib/mystenlab/txn-data-serializers/type-tag-serializer.js +119 -0
  69. package/dist/src/lib/mystenlab/types/coin.d.ts +89 -0
  70. package/dist/src/lib/mystenlab/types/coin.d.ts.map +1 -0
  71. package/dist/src/lib/mystenlab/types/coin.js +32 -0
  72. package/dist/src/lib/mystenlab/types/common.d.ts +45 -0
  73. package/dist/src/lib/mystenlab/types/common.d.ts.map +1 -0
  74. package/dist/src/lib/mystenlab/types/common.js +84 -0
  75. package/dist/src/lib/mystenlab/types/events.d.ts +198 -0
  76. package/dist/src/lib/mystenlab/types/events.d.ts.map +1 -0
  77. package/dist/src/lib/mystenlab/types/events.js +46 -0
  78. package/dist/src/lib/mystenlab/types/index.d.ts +9 -0
  79. package/dist/src/lib/mystenlab/types/index.d.ts.map +1 -0
  80. package/dist/src/lib/mystenlab/types/index.js +25 -0
  81. package/dist/src/lib/mystenlab/types/normalized.d.ts +254 -0
  82. package/dist/src/lib/mystenlab/types/normalized.d.ts.map +1 -0
  83. package/dist/src/lib/mystenlab/types/normalized.js +111 -0
  84. package/dist/src/lib/mystenlab/types/objects.d.ts +806 -0
  85. package/dist/src/lib/mystenlab/types/objects.d.ts.map +1 -0
  86. package/dist/src/lib/mystenlab/types/objects.js +292 -0
  87. package/dist/src/lib/mystenlab/types/option.d.ts +8 -0
  88. package/dist/src/lib/mystenlab/types/option.d.ts.map +1 -0
  89. package/dist/src/lib/mystenlab/types/option.js +13 -0
  90. package/dist/src/lib/mystenlab/types/sui-bcs.d.ts +111 -0
  91. package/dist/src/lib/mystenlab/types/sui-bcs.d.ts.map +1 -0
  92. package/dist/src/lib/mystenlab/types/sui-bcs.js +107 -0
  93. package/dist/src/lib/mystenlab/types/transactions.d.ts +6703 -0
  94. package/dist/src/lib/mystenlab/types/transactions.d.ts.map +1 -0
  95. package/dist/src/lib/mystenlab/types/transactions.js +389 -0
  96. package/dist/src/lib/mystenlab/types/validator.d.ts +641 -0
  97. package/dist/src/lib/mystenlab/types/validator.d.ts.map +1 -0
  98. package/dist/src/lib/mystenlab/types/validator.js +156 -0
  99. package/dist/src/lib/resources/walrusConfig.d.ts +22 -0
  100. package/dist/src/lib/resources/walrusConfig.d.ts.map +1 -0
  101. package/dist/src/lib/resources/walrusConfig.js +37 -0
  102. package/dist/src/lib/rpcClient.d.ts +5 -0
  103. package/dist/src/lib/rpcClient.d.ts.map +1 -0
  104. package/dist/src/lib/rpcClient.js +74 -0
  105. package/dist/src/lib/stakingBuilder.d.ts +62 -0
  106. package/dist/src/lib/stakingBuilder.d.ts.map +1 -0
  107. package/dist/src/lib/stakingBuilder.js +206 -0
  108. package/dist/src/lib/stakingTransaction.d.ts +51 -0
  109. package/dist/src/lib/stakingTransaction.d.ts.map +1 -0
  110. package/dist/src/lib/stakingTransaction.js +219 -0
  111. package/dist/src/lib/tokenTransferBuilder.d.ts +38 -0
  112. package/dist/src/lib/tokenTransferBuilder.d.ts.map +1 -0
  113. package/dist/src/lib/tokenTransferBuilder.js +132 -0
  114. package/dist/src/lib/tokenTransferTransaction.d.ts +57 -0
  115. package/dist/src/lib/tokenTransferTransaction.d.ts.map +1 -0
  116. package/dist/src/lib/tokenTransferTransaction.js +250 -0
  117. package/dist/src/lib/transaction.d.ts +82 -0
  118. package/dist/src/lib/transaction.d.ts.map +1 -0
  119. package/dist/src/lib/transaction.js +283 -0
  120. package/dist/src/lib/transactionBuilder.d.ts +60 -0
  121. package/dist/src/lib/transactionBuilder.d.ts.map +1 -0
  122. package/dist/src/lib/transactionBuilder.js +140 -0
  123. package/dist/src/lib/transactionBuilderFactory.d.ts +48 -0
  124. package/dist/src/lib/transactionBuilderFactory.d.ts.map +1 -0
  125. package/dist/src/lib/transactionBuilderFactory.js +127 -0
  126. package/dist/src/lib/transferBuilder.d.ts +37 -0
  127. package/dist/src/lib/transferBuilder.d.ts.map +1 -0
  128. package/dist/src/lib/transferBuilder.js +132 -0
  129. package/dist/src/lib/transferTransaction.d.ts +54 -0
  130. package/dist/src/lib/transferTransaction.d.ts.map +1 -0
  131. package/dist/src/lib/transferTransaction.js +203 -0
  132. package/dist/src/lib/unstakingBuilder.d.ts +62 -0
  133. package/dist/src/lib/unstakingBuilder.d.ts.map +1 -0
  134. package/dist/src/lib/unstakingBuilder.js +227 -0
  135. package/dist/src/lib/unstakingTransaction.d.ts +75 -0
  136. package/dist/src/lib/unstakingTransaction.d.ts.map +1 -0
  137. package/dist/src/lib/unstakingTransaction.js +345 -0
  138. package/dist/src/lib/utils.d.ts +127 -0
  139. package/dist/src/lib/utils.d.ts.map +1 -0
  140. package/dist/src/lib/utils.js +539 -0
  141. package/dist/src/lib/walrusStakingBuilder.d.ts +66 -0
  142. package/dist/src/lib/walrusStakingBuilder.d.ts.map +1 -0
  143. package/dist/src/lib/walrusStakingBuilder.js +200 -0
  144. package/dist/src/lib/walrusStakingTransaction.d.ts +52 -0
  145. package/dist/src/lib/walrusStakingTransaction.d.ts.map +1 -0
  146. package/dist/src/lib/walrusStakingTransaction.js +269 -0
  147. package/dist/src/lib/walrusWithdrawStakeBuilder.d.ts +36 -0
  148. package/dist/src/lib/walrusWithdrawStakeBuilder.d.ts.map +1 -0
  149. package/dist/src/lib/walrusWithdrawStakeBuilder.js +173 -0
  150. package/dist/src/lib/walrusWithdrawStakeTransaction.d.ts +21 -0
  151. package/dist/src/lib/walrusWithdrawStakeTransaction.d.ts.map +1 -0
  152. package/dist/src/lib/walrusWithdrawStakeTransaction.js +190 -0
  153. package/dist/src/register.d.ts +3 -0
  154. package/dist/src/register.d.ts.map +1 -0
  155. package/dist/src/register.js +15 -0
  156. package/dist/src/sui.d.ts +92 -0
  157. package/dist/src/sui.d.ts.map +1 -0
  158. package/dist/src/sui.js +665 -0
  159. package/dist/src/suiToken.d.ts +22 -0
  160. package/dist/src/suiToken.d.ts.map +1 -0
  161. package/dist/src/suiToken.js +61 -0
  162. package/dist/src/tsui.d.ts +22 -0
  163. package/dist/src/tsui.d.ts.map +1 -0
  164. package/dist/src/tsui.js +30 -0
  165. package/package.json +63 -0
@@ -0,0 +1,806 @@
1
+ import { Infer } from 'superstruct';
2
+ import { ObjectId, ObjectOwner, TransactionDigest } from './common';
3
+ import { OwnedObjectRef } from './transactions';
4
+ export declare const ObjectType: import("superstruct").Struct<string, null>;
5
+ export type ObjectType = Infer<typeof ObjectType>;
6
+ export declare const SuiObjectRef: import("superstruct").Struct<{
7
+ digest: string;
8
+ objectId: string;
9
+ version: string | number;
10
+ }, {
11
+ /** Base64 string representing the object digest */
12
+ digest: import("superstruct").Struct<string, null>;
13
+ /** Hex code as string representing the object id */
14
+ objectId: import("superstruct").Struct<string, null>;
15
+ /** Object version */
16
+ version: import("superstruct").Struct<string | number, null>;
17
+ }>;
18
+ export type SuiObjectRef = Infer<typeof SuiObjectRef>;
19
+ export declare const SuiGasData: import("superstruct").Struct<{
20
+ budget: number;
21
+ price: number;
22
+ payment: {
23
+ digest: string;
24
+ objectId: string;
25
+ version: string | number;
26
+ }[];
27
+ owner: string;
28
+ }, {
29
+ payment: import("superstruct").Struct<{
30
+ digest: string;
31
+ objectId: string;
32
+ version: string | number;
33
+ }[], import("superstruct").Struct<{
34
+ digest: string;
35
+ objectId: string;
36
+ version: string | number;
37
+ }, {
38
+ /** Base64 string representing the object digest */
39
+ digest: import("superstruct").Struct<string, null>;
40
+ /** Hex code as string representing the object id */
41
+ objectId: import("superstruct").Struct<string, null>;
42
+ /** Object version */
43
+ version: import("superstruct").Struct<string | number, null>;
44
+ }>>;
45
+ /** Gas Object's owner */
46
+ owner: import("superstruct").Struct<string, null>;
47
+ price: import("superstruct").Struct<number, null>;
48
+ budget: import("superstruct").Struct<number, null>;
49
+ }>;
50
+ export type SuiGasData = Infer<typeof SuiGasData>;
51
+ export declare const SuiObjectInfo: import("superstruct").Struct<{
52
+ digest: string;
53
+ objectId: string;
54
+ version: string | number;
55
+ type: string;
56
+ owner: {
57
+ AddressOwner: string;
58
+ } | {
59
+ ObjectOwner: string;
60
+ } | {
61
+ Shared: {
62
+ initial_shared_version: number;
63
+ };
64
+ } | "Immutable";
65
+ previousTransaction: string;
66
+ }, {
67
+ type: import("superstruct").Struct<string, null>;
68
+ owner: import("superstruct").Struct<{
69
+ AddressOwner: string;
70
+ } | {
71
+ ObjectOwner: string;
72
+ } | {
73
+ Shared: {
74
+ initial_shared_version: number;
75
+ };
76
+ } | "Immutable", null>;
77
+ previousTransaction: import("superstruct").Struct<string, null>;
78
+ digest: import("superstruct").Struct<string, null>;
79
+ objectId: import("superstruct").Struct<string, null>;
80
+ version: import("superstruct").Struct<string | number, null>;
81
+ }>;
82
+ export type SuiObjectInfo = Infer<typeof SuiObjectInfo>;
83
+ export declare const ObjectContentFields: import("superstruct").Struct<Record<string, any>, null>;
84
+ export type ObjectContentFields = Infer<typeof ObjectContentFields>;
85
+ export declare const MovePackageContent: import("superstruct").Struct<Record<string, string>, null>;
86
+ export type MovePackageContent = Infer<typeof MovePackageContent>;
87
+ export declare const SuiMoveObject: import("superstruct").Struct<{
88
+ type: string;
89
+ fields: Record<string, any>;
90
+ hasPublicTransfer: boolean;
91
+ }, {
92
+ /** Move type (e.g., "0x2::coin::Coin<0x2::sui::SUI>") */
93
+ type: import("superstruct").Struct<string, null>;
94
+ /** Fields and values stored inside the Move object */
95
+ fields: import("superstruct").Struct<Record<string, any>, null>;
96
+ hasPublicTransfer: import("superstruct").Struct<boolean, null>;
97
+ }>;
98
+ export type SuiMoveObject = Infer<typeof SuiMoveObject>;
99
+ export declare const SuiMovePackage: import("superstruct").Struct<{
100
+ disassembled: Record<string, string>;
101
+ }, {
102
+ /** A mapping from module name to disassembled Move bytecode */
103
+ disassembled: import("superstruct").Struct<Record<string, string>, null>;
104
+ }>;
105
+ export type SuiMovePackage = Infer<typeof SuiMovePackage>;
106
+ export declare const SuiParsedData: import("superstruct").Struct<{
107
+ type: string;
108
+ fields: Record<string, any>;
109
+ hasPublicTransfer: boolean;
110
+ dataType: "moveObject";
111
+ } | {
112
+ disassembled: Record<string, string>;
113
+ dataType: "package";
114
+ }, null>;
115
+ export type SuiParsedData = Infer<typeof SuiParsedData>;
116
+ export declare const SuiRawMoveObject: import("superstruct").Struct<{
117
+ version: number;
118
+ type: string;
119
+ hasPublicTransfer: boolean;
120
+ bcsBytes: number[];
121
+ }, {
122
+ /** Move type (e.g., "0x2::coin::Coin<0x2::sui::SUI>") */
123
+ type: import("superstruct").Struct<string, null>;
124
+ hasPublicTransfer: import("superstruct").Struct<boolean, null>;
125
+ version: import("superstruct").Struct<number, null>;
126
+ bcsBytes: import("superstruct").Struct<number[], import("superstruct").Struct<number, null>>;
127
+ }>;
128
+ export type SuiRawMoveObject = Infer<typeof SuiRawMoveObject>;
129
+ export declare const SuiRawMovePackage: import("superstruct").Struct<{
130
+ id: string;
131
+ moduleMap: Record<string, string>;
132
+ }, {
133
+ id: import("superstruct").Struct<string, null>;
134
+ /** A mapping from module name to Move bytecode enocded in base64*/
135
+ moduleMap: import("superstruct").Struct<Record<string, string>, null>;
136
+ }>;
137
+ export type SuiRawMovePackage = Infer<typeof SuiRawMovePackage>;
138
+ export declare const SuiRawData: import("superstruct").Struct<{
139
+ type: string;
140
+ fields: Record<string, any>;
141
+ hasPublicTransfer: boolean;
142
+ dataType: "moveObject";
143
+ } | {
144
+ id: string;
145
+ dataType: "package";
146
+ moduleMap: Record<string, string>;
147
+ }, null>;
148
+ export type SuiRawData = Infer<typeof SuiRawData>;
149
+ export declare const MIST_PER_SUI: bigint;
150
+ export declare const ObjectDigest: import("superstruct").Struct<string, null>;
151
+ export type ObjectDigest = Infer<typeof ObjectDigest>;
152
+ export declare const SuiObjectData: import("superstruct").Struct<{
153
+ digest: string;
154
+ objectId: string;
155
+ version: number;
156
+ type?: string | undefined;
157
+ owner?: {
158
+ AddressOwner: string;
159
+ } | {
160
+ ObjectOwner: string;
161
+ } | {
162
+ Shared: {
163
+ initial_shared_version: number;
164
+ };
165
+ } | "Immutable" | undefined;
166
+ content?: {
167
+ type: string;
168
+ fields: Record<string, any>;
169
+ hasPublicTransfer: boolean;
170
+ dataType: "moveObject";
171
+ } | {
172
+ disassembled: Record<string, string>;
173
+ dataType: "package";
174
+ } | undefined;
175
+ bcs?: {
176
+ type: string;
177
+ fields: Record<string, any>;
178
+ hasPublicTransfer: boolean;
179
+ dataType: "moveObject";
180
+ } | {
181
+ id: string;
182
+ dataType: "package";
183
+ moduleMap: Record<string, string>;
184
+ } | undefined;
185
+ previousTransaction?: string | undefined;
186
+ storageRebate?: number | undefined;
187
+ display?: Record<string, string> | undefined;
188
+ }, {
189
+ objectId: import("superstruct").Struct<string, null>;
190
+ version: import("superstruct").Struct<number, null>;
191
+ digest: import("superstruct").Struct<string, null>;
192
+ /**
193
+ * Type of the object, default to be undefined unless SuiObjectDataOptions.showType is set to true
194
+ */
195
+ type: import("superstruct").Struct<string | undefined, null>;
196
+ /**
197
+ * Move object content or package content, default to be undefined unless SuiObjectDataOptions.showContent is set to true
198
+ */
199
+ content: import("superstruct").Struct<{
200
+ type: string;
201
+ fields: Record<string, any>;
202
+ hasPublicTransfer: boolean;
203
+ dataType: "moveObject";
204
+ } | {
205
+ disassembled: Record<string, string>;
206
+ dataType: "package";
207
+ } | undefined, null>;
208
+ /**
209
+ * Move object content or package content in BCS bytes, default to be undefined unless SuiObjectDataOptions.showBcs is set to true
210
+ */
211
+ bcs: import("superstruct").Struct<{
212
+ type: string;
213
+ fields: Record<string, any>;
214
+ hasPublicTransfer: boolean;
215
+ dataType: "moveObject";
216
+ } | {
217
+ id: string;
218
+ dataType: "package";
219
+ moduleMap: Record<string, string>;
220
+ } | undefined, null>;
221
+ /**
222
+ * The owner of this object. Default to be undefined unless SuiObjectDataOptions.showOwner is set to true
223
+ */
224
+ owner: import("superstruct").Struct<{
225
+ AddressOwner: string;
226
+ } | {
227
+ ObjectOwner: string;
228
+ } | {
229
+ Shared: {
230
+ initial_shared_version: number;
231
+ };
232
+ } | "Immutable" | undefined, null>;
233
+ /**
234
+ * The digest of the transaction that created or last mutated this object.
235
+ * Default to be undefined unless SuiObjectDataOptions.showPreviousTransaction is set to true
236
+ */
237
+ previousTransaction: import("superstruct").Struct<string | undefined, null>;
238
+ /**
239
+ * The amount of SUI we would rebate if this object gets deleted.
240
+ * This number is re-calculated each time the object is mutated based on
241
+ * the present storage gas price.
242
+ * Default to be undefined unless SuiObjectDataOptions.showStorageRebate is set to true
243
+ */
244
+ storageRebate: import("superstruct").Struct<number | undefined, null>;
245
+ /**
246
+ * Display metadata for this object, default to be undefined unless SuiObjectDataOptions.showDisplay is set to true
247
+ * This can also be None if the struct type does not have Display defined
248
+ * See more details in https://forums.sui.io/t/nft-object-display-proposal/4872
249
+ */
250
+ display: import("superstruct").Struct<Record<string, string> | undefined, null>;
251
+ }>;
252
+ export type SuiObjectData = Infer<typeof SuiObjectData>;
253
+ /**
254
+ * Config for fetching object data
255
+ */
256
+ export declare const SuiObjectDataOptions: import("superstruct").Struct<{
257
+ showType?: boolean | undefined;
258
+ showContent?: boolean | undefined;
259
+ showBcs?: boolean | undefined;
260
+ showOwner?: boolean | undefined;
261
+ showPreviousTransaction?: boolean | undefined;
262
+ showStorageRebate?: boolean | undefined;
263
+ showDisplay?: boolean | undefined;
264
+ }, {
265
+ showType: import("superstruct").Struct<boolean | undefined, null>;
266
+ showContent: import("superstruct").Struct<boolean | undefined, null>;
267
+ showBcs: import("superstruct").Struct<boolean | undefined, null>;
268
+ showOwner: import("superstruct").Struct<boolean | undefined, null>;
269
+ showPreviousTransaction: import("superstruct").Struct<boolean | undefined, null>;
270
+ showStorageRebate: import("superstruct").Struct<boolean | undefined, null>;
271
+ showDisplay: import("superstruct").Struct<boolean | undefined, null>;
272
+ }>;
273
+ export type SuiObjectDataOptions = Infer<typeof SuiObjectDataOptions>;
274
+ export declare const ObjectStatus: import("superstruct").Struct<"Exists" | "NotExists" | "Deleted", null>;
275
+ export type ObjectStatus = Infer<typeof ObjectStatus>;
276
+ export declare const GetOwnedObjectsResponse: import("superstruct").Struct<{
277
+ digest: string;
278
+ objectId: string;
279
+ version: string | number;
280
+ type: string;
281
+ owner: {
282
+ AddressOwner: string;
283
+ } | {
284
+ ObjectOwner: string;
285
+ } | {
286
+ Shared: {
287
+ initial_shared_version: number;
288
+ };
289
+ } | "Immutable";
290
+ previousTransaction: string;
291
+ }[], import("superstruct").Struct<{
292
+ digest: string;
293
+ objectId: string;
294
+ version: string | number;
295
+ type: string;
296
+ owner: {
297
+ AddressOwner: string;
298
+ } | {
299
+ ObjectOwner: string;
300
+ } | {
301
+ Shared: {
302
+ initial_shared_version: number;
303
+ };
304
+ } | "Immutable";
305
+ previousTransaction: string;
306
+ }, {
307
+ type: import("superstruct").Struct<string, null>;
308
+ owner: import("superstruct").Struct<{
309
+ AddressOwner: string;
310
+ } | {
311
+ ObjectOwner: string;
312
+ } | {
313
+ Shared: {
314
+ initial_shared_version: number;
315
+ };
316
+ } | "Immutable", null>;
317
+ previousTransaction: import("superstruct").Struct<string, null>;
318
+ digest: import("superstruct").Struct<string, null>;
319
+ objectId: import("superstruct").Struct<string, null>;
320
+ version: import("superstruct").Struct<string | number, null>;
321
+ }>>;
322
+ export type GetOwnedObjectsResponse = Infer<typeof GetOwnedObjectsResponse>;
323
+ export declare const SuiObjectResponseError: import("superstruct").Struct<{
324
+ tag: string;
325
+ digest?: string | undefined;
326
+ version?: number | undefined;
327
+ object_id?: string | undefined;
328
+ }, {
329
+ tag: import("superstruct").Struct<string, null>;
330
+ object_id: import("superstruct").Struct<string | undefined, null>;
331
+ version: import("superstruct").Struct<number | undefined, null>;
332
+ digest: import("superstruct").Struct<string | undefined, null>;
333
+ }>;
334
+ export type SuiObjectResponseError = Infer<typeof SuiObjectResponseError>;
335
+ export declare const SuiObjectResponse: import("superstruct").Struct<{
336
+ data?: {
337
+ digest: string;
338
+ objectId: string;
339
+ version: number;
340
+ type?: string | undefined;
341
+ owner?: {
342
+ AddressOwner: string;
343
+ } | {
344
+ ObjectOwner: string;
345
+ } | {
346
+ Shared: {
347
+ initial_shared_version: number;
348
+ };
349
+ } | "Immutable" | undefined;
350
+ content?: {
351
+ type: string;
352
+ fields: Record<string, any>;
353
+ hasPublicTransfer: boolean;
354
+ dataType: "moveObject";
355
+ } | {
356
+ disassembled: Record<string, string>;
357
+ dataType: "package";
358
+ } | undefined;
359
+ bcs?: {
360
+ type: string;
361
+ fields: Record<string, any>;
362
+ hasPublicTransfer: boolean;
363
+ dataType: "moveObject";
364
+ } | {
365
+ id: string;
366
+ dataType: "package";
367
+ moduleMap: Record<string, string>;
368
+ } | undefined;
369
+ previousTransaction?: string | undefined;
370
+ storageRebate?: number | undefined;
371
+ display?: Record<string, string> | undefined;
372
+ } | undefined;
373
+ error?: {
374
+ tag: string;
375
+ digest?: string | undefined;
376
+ version?: number | undefined;
377
+ object_id?: string | undefined;
378
+ } | undefined;
379
+ }, {
380
+ data: import("superstruct").Struct<{
381
+ digest: string;
382
+ objectId: string;
383
+ version: number;
384
+ type?: string | undefined;
385
+ owner?: {
386
+ AddressOwner: string;
387
+ } | {
388
+ ObjectOwner: string;
389
+ } | {
390
+ Shared: {
391
+ initial_shared_version: number;
392
+ };
393
+ } | "Immutable" | undefined;
394
+ content?: {
395
+ type: string;
396
+ fields: Record<string, any>;
397
+ hasPublicTransfer: boolean;
398
+ dataType: "moveObject";
399
+ } | {
400
+ disassembled: Record<string, string>;
401
+ dataType: "package";
402
+ } | undefined;
403
+ bcs?: {
404
+ type: string;
405
+ fields: Record<string, any>;
406
+ hasPublicTransfer: boolean;
407
+ dataType: "moveObject";
408
+ } | {
409
+ id: string;
410
+ dataType: "package";
411
+ moduleMap: Record<string, string>;
412
+ } | undefined;
413
+ previousTransaction?: string | undefined;
414
+ storageRebate?: number | undefined;
415
+ display?: Record<string, string> | undefined;
416
+ } | undefined, {
417
+ objectId: import("superstruct").Struct<string, null>;
418
+ version: import("superstruct").Struct<number, null>;
419
+ digest: import("superstruct").Struct<string, null>;
420
+ /**
421
+ * Type of the object, default to be undefined unless SuiObjectDataOptions.showType is set to true
422
+ */
423
+ type: import("superstruct").Struct<string | undefined, null>;
424
+ /**
425
+ * Move object content or package content, default to be undefined unless SuiObjectDataOptions.showContent is set to true
426
+ */
427
+ content: import("superstruct").Struct<{
428
+ type: string;
429
+ fields: Record<string, any>;
430
+ hasPublicTransfer: boolean;
431
+ dataType: "moveObject";
432
+ } | {
433
+ disassembled: Record<string, string>;
434
+ dataType: "package";
435
+ } | undefined, null>;
436
+ /**
437
+ * Move object content or package content in BCS bytes, default to be undefined unless SuiObjectDataOptions.showBcs is set to true
438
+ */
439
+ bcs: import("superstruct").Struct<{
440
+ type: string;
441
+ fields: Record<string, any>;
442
+ hasPublicTransfer: boolean;
443
+ dataType: "moveObject";
444
+ } | {
445
+ id: string;
446
+ dataType: "package";
447
+ moduleMap: Record<string, string>;
448
+ } | undefined, null>;
449
+ /**
450
+ * The owner of this object. Default to be undefined unless SuiObjectDataOptions.showOwner is set to true
451
+ */
452
+ owner: import("superstruct").Struct<{
453
+ AddressOwner: string;
454
+ } | {
455
+ ObjectOwner: string;
456
+ } | {
457
+ Shared: {
458
+ initial_shared_version: number;
459
+ };
460
+ } | "Immutable" | undefined, null>;
461
+ /**
462
+ * The digest of the transaction that created or last mutated this object.
463
+ * Default to be undefined unless SuiObjectDataOptions.showPreviousTransaction is set to true
464
+ */
465
+ previousTransaction: import("superstruct").Struct<string | undefined, null>;
466
+ /**
467
+ * The amount of SUI we would rebate if this object gets deleted.
468
+ * This number is re-calculated each time the object is mutated based on
469
+ * the present storage gas price.
470
+ * Default to be undefined unless SuiObjectDataOptions.showStorageRebate is set to true
471
+ */
472
+ storageRebate: import("superstruct").Struct<number | undefined, null>;
473
+ /**
474
+ * Display metadata for this object, default to be undefined unless SuiObjectDataOptions.showDisplay is set to true
475
+ * This can also be None if the struct type does not have Display defined
476
+ * See more details in https://forums.sui.io/t/nft-object-display-proposal/4872
477
+ */
478
+ display: import("superstruct").Struct<Record<string, string> | undefined, null>;
479
+ }>;
480
+ error: import("superstruct").Struct<{
481
+ tag: string;
482
+ digest?: string | undefined;
483
+ version?: number | undefined;
484
+ object_id?: string | undefined;
485
+ } | undefined, {
486
+ tag: import("superstruct").Struct<string, null>;
487
+ object_id: import("superstruct").Struct<string | undefined, null>;
488
+ version: import("superstruct").Struct<number | undefined, null>;
489
+ digest: import("superstruct").Struct<string | undefined, null>;
490
+ }>;
491
+ }>;
492
+ export type SuiObjectResponse = Infer<typeof SuiObjectResponse>;
493
+ export type Order = 'ascending' | 'descending';
494
+ export declare function getSuiObjectData(resp: SuiObjectResponse): SuiObjectData | undefined;
495
+ export declare function getObjectDeletedResponse(resp: SuiObjectResponse): SuiObjectRef | undefined;
496
+ export declare function getObjectNotExistsResponse(resp: SuiObjectResponse): ObjectId | undefined;
497
+ export declare function getObjectReference(resp: SuiObjectResponse | OwnedObjectRef): SuiObjectRef | undefined;
498
+ export declare function getObjectId(data: SuiObjectResponse | SuiObjectRef | OwnedObjectRef): ObjectId;
499
+ export declare function getObjectVersion(data: SuiObjectResponse | SuiObjectRef | SuiObjectData): string | number | undefined;
500
+ export declare function isSuiObjectResponse(resp: SuiObjectResponse | SuiObjectData): resp is SuiObjectResponse;
501
+ /**
502
+ * Deriving the object type from the object response
503
+ * @returns 'package' if the object is a package, move object type(e.g., 0x2::coin::Coin<0x2::sui::SUI>)
504
+ * if the object is a move object
505
+ */
506
+ export declare function getObjectType(resp: SuiObjectResponse | SuiObjectData): ObjectType | undefined;
507
+ export declare function getObjectPreviousTransactionDigest(resp: SuiObjectResponse): TransactionDigest | undefined;
508
+ export declare function getObjectOwner(resp: SuiObjectResponse | ObjectOwner): ObjectOwner | undefined;
509
+ export declare function getObjectDisplay(resp: SuiObjectResponse): Record<string, string> | undefined;
510
+ export declare function getSharedObjectInitialVersion(resp: SuiObjectResponse | ObjectOwner): number | undefined;
511
+ export declare function isSharedObject(resp: SuiObjectResponse | ObjectOwner): boolean;
512
+ export declare function isImmutableObject(resp: SuiObjectResponse | ObjectOwner): boolean;
513
+ export declare function getMoveObjectType(resp: SuiObjectResponse): string | undefined;
514
+ export declare function getObjectFields(resp: SuiObjectResponse | SuiMoveObject | SuiObjectData): ObjectContentFields | undefined;
515
+ export interface SuiObjectDataWithContent extends SuiObjectData {
516
+ content: SuiParsedData;
517
+ }
518
+ export declare function getMoveObject(data: SuiObjectResponse | SuiObjectData): SuiMoveObject | undefined;
519
+ export declare function hasPublicTransfer(data: SuiObjectResponse | SuiObjectData): boolean;
520
+ export declare function getMovePackageContent(data: SuiObjectResponse | SuiMovePackage): MovePackageContent | undefined;
521
+ export declare const CheckpointedObjectId: import("superstruct").Struct<{
522
+ objectId: string;
523
+ atCheckpoint?: number | undefined;
524
+ }, {
525
+ objectId: import("superstruct").Struct<string, null>;
526
+ atCheckpoint: import("superstruct").Struct<number | undefined, null>;
527
+ }>;
528
+ export type CheckpointedObjectId = Infer<typeof CheckpointedObjectId>;
529
+ export declare const PaginatedObjectsResponse: import("superstruct").Struct<{
530
+ data: {
531
+ data?: {
532
+ digest: string;
533
+ objectId: string;
534
+ version: number;
535
+ type?: string | undefined;
536
+ owner?: {
537
+ AddressOwner: string;
538
+ } | {
539
+ ObjectOwner: string;
540
+ } | {
541
+ Shared: {
542
+ initial_shared_version: number;
543
+ };
544
+ } | "Immutable" | undefined;
545
+ content?: {
546
+ type: string;
547
+ fields: Record<string, any>;
548
+ hasPublicTransfer: boolean;
549
+ dataType: "moveObject";
550
+ } | {
551
+ disassembled: Record<string, string>;
552
+ dataType: "package";
553
+ } | undefined;
554
+ bcs?: {
555
+ type: string;
556
+ fields: Record<string, any>;
557
+ hasPublicTransfer: boolean;
558
+ dataType: "moveObject";
559
+ } | {
560
+ id: string;
561
+ dataType: "package";
562
+ moduleMap: Record<string, string>;
563
+ } | undefined;
564
+ previousTransaction?: string | undefined;
565
+ storageRebate?: number | undefined;
566
+ display?: Record<string, string> | undefined;
567
+ } | undefined;
568
+ error?: {
569
+ tag: string;
570
+ digest?: string | undefined;
571
+ version?: number | undefined;
572
+ object_id?: string | undefined;
573
+ } | undefined;
574
+ }[];
575
+ hasNextPage: boolean;
576
+ nextCursor?: {
577
+ objectId: string;
578
+ atCheckpoint?: number | undefined;
579
+ } | undefined;
580
+ }, {
581
+ data: import("superstruct").Struct<{
582
+ data?: {
583
+ digest: string;
584
+ objectId: string;
585
+ version: number;
586
+ type?: string | undefined;
587
+ owner?: {
588
+ AddressOwner: string;
589
+ } | {
590
+ ObjectOwner: string;
591
+ } | {
592
+ Shared: {
593
+ initial_shared_version: number;
594
+ };
595
+ } | "Immutable" | undefined;
596
+ content?: {
597
+ type: string;
598
+ fields: Record<string, any>;
599
+ hasPublicTransfer: boolean;
600
+ dataType: "moveObject";
601
+ } | {
602
+ disassembled: Record<string, string>;
603
+ dataType: "package";
604
+ } | undefined;
605
+ bcs?: {
606
+ type: string;
607
+ fields: Record<string, any>;
608
+ hasPublicTransfer: boolean;
609
+ dataType: "moveObject";
610
+ } | {
611
+ id: string;
612
+ dataType: "package";
613
+ moduleMap: Record<string, string>;
614
+ } | undefined;
615
+ previousTransaction?: string | undefined;
616
+ storageRebate?: number | undefined;
617
+ display?: Record<string, string> | undefined;
618
+ } | undefined;
619
+ error?: {
620
+ tag: string;
621
+ digest?: string | undefined;
622
+ version?: number | undefined;
623
+ object_id?: string | undefined;
624
+ } | undefined;
625
+ }[], import("superstruct").Struct<{
626
+ data?: {
627
+ digest: string;
628
+ objectId: string;
629
+ version: number;
630
+ type?: string | undefined;
631
+ owner?: {
632
+ AddressOwner: string;
633
+ } | {
634
+ ObjectOwner: string;
635
+ } | {
636
+ Shared: {
637
+ initial_shared_version: number;
638
+ };
639
+ } | "Immutable" | undefined;
640
+ content?: {
641
+ type: string;
642
+ fields: Record<string, any>;
643
+ hasPublicTransfer: boolean;
644
+ dataType: "moveObject";
645
+ } | {
646
+ disassembled: Record<string, string>;
647
+ dataType: "package";
648
+ } | undefined;
649
+ bcs?: {
650
+ type: string;
651
+ fields: Record<string, any>;
652
+ hasPublicTransfer: boolean;
653
+ dataType: "moveObject";
654
+ } | {
655
+ id: string;
656
+ dataType: "package";
657
+ moduleMap: Record<string, string>;
658
+ } | undefined;
659
+ previousTransaction?: string | undefined;
660
+ storageRebate?: number | undefined;
661
+ display?: Record<string, string> | undefined;
662
+ } | undefined;
663
+ error?: {
664
+ tag: string;
665
+ digest?: string | undefined;
666
+ version?: number | undefined;
667
+ object_id?: string | undefined;
668
+ } | undefined;
669
+ }, {
670
+ data: import("superstruct").Struct<{
671
+ digest: string;
672
+ objectId: string;
673
+ version: number;
674
+ type?: string | undefined;
675
+ owner?: {
676
+ AddressOwner: string;
677
+ } | {
678
+ ObjectOwner: string;
679
+ } | {
680
+ Shared: {
681
+ initial_shared_version: number;
682
+ };
683
+ } | "Immutable" | undefined;
684
+ content?: {
685
+ type: string;
686
+ fields: Record<string, any>;
687
+ hasPublicTransfer: boolean;
688
+ dataType: "moveObject";
689
+ } | {
690
+ disassembled: Record<string, string>;
691
+ dataType: "package";
692
+ } | undefined;
693
+ bcs?: {
694
+ type: string;
695
+ fields: Record<string, any>;
696
+ hasPublicTransfer: boolean;
697
+ dataType: "moveObject";
698
+ } | {
699
+ id: string;
700
+ dataType: "package";
701
+ moduleMap: Record<string, string>;
702
+ } | undefined;
703
+ previousTransaction?: string | undefined;
704
+ storageRebate?: number | undefined;
705
+ display?: Record<string, string> | undefined;
706
+ } | undefined, {
707
+ objectId: import("superstruct").Struct<string, null>;
708
+ version: import("superstruct").Struct<number, null>;
709
+ digest: import("superstruct").Struct<string, null>;
710
+ /**
711
+ * Type of the object, default to be undefined unless SuiObjectDataOptions.showType is set to true
712
+ */
713
+ type: import("superstruct").Struct<string | undefined, null>;
714
+ /**
715
+ * Move object content or package content, default to be undefined unless SuiObjectDataOptions.showContent is set to true
716
+ */
717
+ content: import("superstruct").Struct<{
718
+ type: string;
719
+ fields: Record<string, any>;
720
+ hasPublicTransfer: boolean;
721
+ dataType: "moveObject";
722
+ } | {
723
+ disassembled: Record<string, string>;
724
+ dataType: "package";
725
+ } | undefined, null>;
726
+ /**
727
+ * Move object content or package content in BCS bytes, default to be undefined unless SuiObjectDataOptions.showBcs is set to true
728
+ */
729
+ bcs: import("superstruct").Struct<{
730
+ type: string;
731
+ fields: Record<string, any>;
732
+ hasPublicTransfer: boolean;
733
+ dataType: "moveObject";
734
+ } | {
735
+ id: string;
736
+ dataType: "package";
737
+ moduleMap: Record<string, string>;
738
+ } | undefined, null>;
739
+ /**
740
+ * The owner of this object. Default to be undefined unless SuiObjectDataOptions.showOwner is set to true
741
+ */
742
+ owner: import("superstruct").Struct<{
743
+ AddressOwner: string;
744
+ } | {
745
+ ObjectOwner: string;
746
+ } | {
747
+ Shared: {
748
+ initial_shared_version: number;
749
+ };
750
+ } | "Immutable" | undefined, null>;
751
+ /**
752
+ * The digest of the transaction that created or last mutated this object.
753
+ * Default to be undefined unless SuiObjectDataOptions.showPreviousTransaction is set to true
754
+ */
755
+ previousTransaction: import("superstruct").Struct<string | undefined, null>;
756
+ /**
757
+ * The amount of SUI we would rebate if this object gets deleted.
758
+ * This number is re-calculated each time the object is mutated based on
759
+ * the present storage gas price.
760
+ * Default to be undefined unless SuiObjectDataOptions.showStorageRebate is set to true
761
+ */
762
+ storageRebate: import("superstruct").Struct<number | undefined, null>;
763
+ /**
764
+ * Display metadata for this object, default to be undefined unless SuiObjectDataOptions.showDisplay is set to true
765
+ * This can also be None if the struct type does not have Display defined
766
+ * See more details in https://forums.sui.io/t/nft-object-display-proposal/4872
767
+ */
768
+ display: import("superstruct").Struct<Record<string, string> | undefined, null>;
769
+ }>;
770
+ error: import("superstruct").Struct<{
771
+ tag: string;
772
+ digest?: string | undefined;
773
+ version?: number | undefined;
774
+ object_id?: string | undefined;
775
+ } | undefined, {
776
+ tag: import("superstruct").Struct<string, null>;
777
+ object_id: import("superstruct").Struct<string | undefined, null>;
778
+ version: import("superstruct").Struct<number | undefined, null>;
779
+ digest: import("superstruct").Struct<string | undefined, null>;
780
+ }>;
781
+ }>>;
782
+ nextCursor: import("superstruct").Struct<{
783
+ objectId: string;
784
+ atCheckpoint?: number | undefined;
785
+ } | undefined, {
786
+ objectId: import("superstruct").Struct<string, null>;
787
+ atCheckpoint: import("superstruct").Struct<number | undefined, null>;
788
+ }>;
789
+ hasNextPage: import("superstruct").Struct<boolean, null>;
790
+ }>;
791
+ export type PaginatedObjectsResponse = Infer<typeof PaginatedObjectsResponse>;
792
+ export type SuiObjectDataFilter = {
793
+ Package: ObjectId;
794
+ } | {
795
+ MoveModule: {
796
+ package: ObjectId;
797
+ module: string;
798
+ };
799
+ } | {
800
+ StructType: string;
801
+ };
802
+ export type SuiObjectResponseQuery = {
803
+ filter?: SuiObjectDataFilter;
804
+ options?: SuiObjectDataOptions;
805
+ };
806
+ //# sourceMappingURL=objects.d.ts.map