@0xobelisk/client 0.0.9 → 0.1.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/dist/index.d.ts +0 -1
- package/dist/index.js +327 -290
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +337 -300
- package/dist/index.mjs.map +1 -1
- package/dist/libs/suiAccountManager/index.d.ts +1 -1
- package/dist/libs/suiAccountManager/keypair.d.ts +1 -1
- package/dist/libs/suiContractFactory/index.d.ts +0 -1
- package/dist/libs/suiInteractor/defaultConfig.d.ts +10 -0
- package/dist/libs/suiInteractor/index.d.ts +2 -0
- package/dist/libs/suiInteractor/suiInteractor.d.ts +204 -0
- package/dist/libs/suiInteractor/util.d.ts +1 -0
- package/dist/libs/suiModel/index.d.ts +2 -0
- package/dist/libs/suiModel/suiOwnedObject.d.ts +24 -0
- package/dist/libs/suiModel/suiSharedObject.d.ts +12 -0
- package/dist/libs/suiTxBuilder/index.d.ts +2 -2
- package/dist/libs/suiTxBuilder/util.d.ts +8 -8
- package/dist/metadata/index.d.ts +1 -1
- package/dist/obelisk.d.ts +122 -337
- package/dist/types/index.d.ts +48 -6
- package/package.json +3 -3
- package/src/index.ts +0 -1
- package/src/libs/suiAccountManager/index.ts +1 -1
- package/src/libs/suiAccountManager/keypair.ts +1 -1
- package/src/libs/suiContractFactory/index.ts +0 -1
- package/src/libs/{suiRpcProvider/defaultChainConfigs.ts → suiInteractor/defaultConfig.ts} +4 -2
- package/src/libs/suiInteractor/index.ts +2 -0
- package/src/libs/suiInteractor/suiInteractor.ts +269 -0
- package/src/libs/suiInteractor/util.ts +2 -0
- package/src/libs/suiModel/index.ts +2 -0
- package/src/libs/suiModel/suiOwnedObject.ts +62 -0
- package/src/libs/suiModel/suiSharedObject.ts +33 -0
- package/src/libs/suiTxBuilder/index.ts +1 -1
- package/src/libs/suiTxBuilder/util.ts +1 -1
- package/src/metadata/index.ts +7 -7
- package/src/obelisk.ts +38 -130
- package/src/types/index.ts +92 -10
- package/src/libs/suiAccountManager/types.ts +0 -10
- package/src/libs/suiRpcProvider/faucet.ts +0 -57
- package/src/libs/suiRpcProvider/index.ts +0 -150
- package/src/libs/suiRpcProvider/types.ts +0 -17
- package/src/libs/suiTxBuilder/types.ts +0 -32
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Infer } from 'superstruct';
|
|
2
|
+
import { ObjectCallArg, ObjectId } from '@mysten/sui.js';
|
|
3
|
+
export declare class SuiSharedObject {
|
|
4
|
+
readonly objectId: string;
|
|
5
|
+
initialSharedVersion?: number | string;
|
|
6
|
+
constructor(param: {
|
|
7
|
+
objectId: string;
|
|
8
|
+
initialSharedVersion?: number;
|
|
9
|
+
mutable?: boolean;
|
|
10
|
+
});
|
|
11
|
+
asCallArg(mutable?: boolean): Infer<typeof ObjectCallArg> | Infer<typeof ObjectId>;
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransactionBlock, TransactionExpiration, SuiObjectRef, SharedObjectRef, JsonRpcProvider, TransactionType, Transactions, ObjectCallArg } from '@mysten/sui.js';
|
|
2
|
-
import type { SuiTxArg, SuiObjectArg, SuiVecTxArg } from '
|
|
2
|
+
import type { SuiTxArg, SuiObjectArg, SuiVecTxArg } from 'src/types';
|
|
3
3
|
export declare class SuiTxBlock {
|
|
4
4
|
txBlock: TransactionBlock;
|
|
5
5
|
constructor(transaction?: TransactionBlock);
|
|
@@ -111,8 +111,8 @@ export declare class SuiTxBlock {
|
|
|
111
111
|
resultIndex: number;
|
|
112
112
|
})[];
|
|
113
113
|
kind: "MoveCall";
|
|
114
|
-
typeArguments: string[];
|
|
115
114
|
target: `${string}::${string}::${string}`;
|
|
115
|
+
typeArguments: string[];
|
|
116
116
|
} | {
|
|
117
117
|
objects: ({
|
|
118
118
|
kind: "Input";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransactionArgument, TransactionBlock } from '@mysten/sui.js';
|
|
2
|
-
import { SuiTxArg, SuiInputTypes } from '
|
|
2
|
+
import { SuiTxArg, SuiInputTypes } from 'src/types';
|
|
3
3
|
export declare const getDefaultSuiInputType: (value: any) => SuiInputTypes;
|
|
4
4
|
/**
|
|
5
5
|
* Since we know the elements in the array are the same type
|
|
@@ -15,12 +15,7 @@ export declare const getDefaultSuiInputType: (value: any) => SuiInputTypes;
|
|
|
15
15
|
* @param args
|
|
16
16
|
* @param type 'address' | 'bool' | 'u8' | 'u16' | 'u32' | 'u64' | 'u128' | 'u256' | 'object'
|
|
17
17
|
*/
|
|
18
|
-
export declare function makeVecParam(txBlock: TransactionBlock, args: SuiTxArg[], type?: SuiInputTypes): {
|
|
19
|
-
kind: "Input";
|
|
20
|
-
index: number;
|
|
21
|
-
type?: "object" | "pure" | undefined;
|
|
22
|
-
value?: any;
|
|
23
|
-
} | ({
|
|
18
|
+
export declare function makeVecParam(txBlock: TransactionBlock, args: SuiTxArg[], type?: SuiInputTypes): ({
|
|
24
19
|
kind: "GasCoin";
|
|
25
20
|
} & ({
|
|
26
21
|
kind: "Input";
|
|
@@ -71,6 +66,11 @@ export declare function makeVecParam(txBlock: TransactionBlock, args: SuiTxArg[]
|
|
|
71
66
|
kind: "NestedResult";
|
|
72
67
|
index: number;
|
|
73
68
|
resultIndex: number;
|
|
74
|
-
})[])
|
|
69
|
+
})[]) | {
|
|
70
|
+
kind: "Input";
|
|
71
|
+
index: number;
|
|
72
|
+
type?: "object" | "pure" | undefined;
|
|
73
|
+
value?: any;
|
|
74
|
+
};
|
|
75
75
|
export declare function isMoveVecArg(arg: any): any;
|
|
76
76
|
export declare function convertArgs(txBlock: TransactionBlock, args: any[]): TransactionArgument[];
|
package/dist/metadata/index.d.ts
CHANGED