@0xobelisk/client 0.3.2 → 0.3.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.
@@ -1,141 +0,0 @@
1
- import { Infer } from 'superstruct';
2
- import { DisplayFieldsResponse, ObjectCallArg, ObjectContentFields, SharedObjectRef, SuiObjectRef, TransactionArgument, TransactionBlock, SuiTransactionBlockResponse, DevInspectResults, SuiMoveNormalizedModules } from '@mysten/sui.js';
3
- import { SuiMoveMoudleFuncType } from '../libs/suiContractFactory/types';
4
- export type ObeliskObjectData = {
5
- objectId: string;
6
- objectType: string;
7
- objectVersion: number;
8
- objectDisplay: DisplayFieldsResponse;
9
- objectFields: ObjectContentFields;
10
- };
11
- export type ObeliskParams = {
12
- mnemonics?: string;
13
- secretKey?: string;
14
- fullnodeUrls?: string[];
15
- faucetUrl?: string;
16
- networkType?: NetworkType;
17
- packageId?: string;
18
- metadata?: SuiMoveNormalizedModules;
19
- };
20
- export type SchemaFieldType = {
21
- schemas: {
22
- type: string;
23
- fields: {
24
- id: {
25
- id: string;
26
- };
27
- size: string;
28
- };
29
- };
30
- };
31
- export type SchemaValueType = {
32
- id: {
33
- id: string;
34
- };
35
- name: string;
36
- value: {
37
- type: string;
38
- fields: SchemaFieldType;
39
- };
40
- };
41
- export type SuiTxArgument = {
42
- kind: 'Input';
43
- index: number;
44
- type?: 'object' | 'pure' | undefined;
45
- value?: any;
46
- } | {
47
- kind: 'GasCoin';
48
- } | {
49
- kind: 'Result';
50
- index: number;
51
- } | {
52
- kind: 'NestedResult';
53
- index: number;
54
- resultIndex: number;
55
- };
56
- export type SchemaContentType = {
57
- type: string;
58
- fields: SchemaValueType;
59
- hasPublicTransfer: boolean;
60
- dataType: 'moveObject';
61
- };
62
- export interface MessageMeta {
63
- readonly meta: SuiMoveMoudleFuncType;
64
- }
65
- export interface ContractQuery extends MessageMeta {
66
- (tx: TransactionBlock, params: SuiTxArgument[], isRaw?: boolean): Promise<DevInspectResults | TransactionBlock>;
67
- }
68
- export interface ContractTx extends MessageMeta {
69
- (tx: TransactionBlock, params: SuiTxArgument[], isRaw?: boolean): SuiTransactionBlockResponse | TransactionBlock;
70
- }
71
- export type MapMessageTx = Record<string, ContractTx>;
72
- export type MapMessageQuery = Record<string, ContractQuery>;
73
- export type MapMoudleFuncTx = Record<string, MapMessageTx>;
74
- export type MapMoudleFuncQuery = Record<string, MapMessageQuery>;
75
- export type MapMoudleFuncTest = Record<string, Record<string, string>>;
76
- export type MapMoudleFuncQueryTest = Record<string, Record<string, string>>;
77
- export type AccountMangerParams = {
78
- mnemonics?: string;
79
- secretKey?: string;
80
- };
81
- export type DerivePathParams = {
82
- accountIndex?: number;
83
- isExternal?: boolean;
84
- addressIndex?: number;
85
- };
86
- export type NetworkType = 'testnet' | 'mainnet' | 'devnet' | 'localnet';
87
- export type FaucetNetworkType = 'testnet' | 'devnet' | 'localnet';
88
- export type SuiKitParams = {
89
- mnemonics?: string;
90
- secretKey?: string;
91
- fullnodeUrls?: string[];
92
- faucetUrl?: string;
93
- networkType?: NetworkType;
94
- };
95
- export type ObjectData = {
96
- objectId: string;
97
- objectType: string;
98
- objectVersion: number;
99
- objectDigest: string;
100
- initialSharedVersion?: number;
101
- objectDisplay: DisplayFieldsResponse;
102
- objectFields: ObjectContentFields;
103
- };
104
- export type ObjectFieldType = {
105
- id: {
106
- id: string;
107
- };
108
- name: string;
109
- value: string;
110
- };
111
- export type EntityData = {
112
- objectId: string;
113
- index: string;
114
- key: string;
115
- };
116
- export type SuiTxArg = Infer<typeof TransactionArgument> | Infer<typeof ObjectCallArg> | string | number | bigint | boolean;
117
- export type SuiObjectArg = SharedObjectRef | Infer<typeof SuiObjectRef> | string | Infer<typeof ObjectCallArg> | Infer<typeof TransactionArgument>;
118
- export type SuiVecTxArg = {
119
- value: SuiTxArg[];
120
- vecType: SuiInputTypes;
121
- } | SuiTxArg[];
122
- /**
123
- * These are the basics types that can be used in the SUI
124
- */
125
- export type SuiBasicTypes = 'address' | 'bool' | 'u8' | 'u16' | 'u32' | 'u64' | 'u128' | 'u256';
126
- export type SuiInputTypes = 'object' | SuiBasicTypes;
127
- export type SuiReturnValues = {
128
- returnValues: [number[], string][];
129
- }[];
130
- export type DynamicFieldContentType = {
131
- type: string;
132
- fields: Record<string, any>;
133
- hasPublicTransfer: boolean;
134
- dataType: string;
135
- };
136
- export type ObjectContent = {
137
- type: string;
138
- fields: Record<string, any>;
139
- hasPublicTransfer: boolean;
140
- dataType: string;
141
- };