@typemove/sui 1.5.6 → 1.5.7-rc.1

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.
@@ -2629,6 +2629,283 @@ export namespace critbit {
2629
2629
  }
2630
2630
 
2631
2631
  export namespace builder {
2632
+ export function borrowLeafByIndex<T0 = any>(
2633
+ tx: TransactionBlock,
2634
+ args: [
2635
+ string | TransactionObjectArgument | TransactionArgument,
2636
+ bigint | TransactionArgument,
2637
+ ],
2638
+ typeArguments: [TypeDescriptor<T0> | string],
2639
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2640
+ const _args: any[] = [];
2641
+ _args.push(transactionArgumentOrObject(args[0], tx));
2642
+ _args.push(transactionArgumentOrPure(args[1], tx));
2643
+
2644
+ // @ts-ignore
2645
+ return tx.moveCall({
2646
+ target: "0xdee9::critbit::borrow_leaf_by_index",
2647
+ arguments: _args,
2648
+ typeArguments: [
2649
+ typeof typeArguments[0] === "string"
2650
+ ? typeArguments[0]
2651
+ : typeArguments[0].getSignature(),
2652
+ ],
2653
+ });
2654
+ }
2655
+ export function borrowLeafByKey<T0 = any>(
2656
+ tx: TransactionBlock,
2657
+ args: [
2658
+ string | TransactionObjectArgument | TransactionArgument,
2659
+ bigint | TransactionArgument,
2660
+ ],
2661
+ typeArguments: [TypeDescriptor<T0> | string],
2662
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2663
+ const _args: any[] = [];
2664
+ _args.push(transactionArgumentOrObject(args[0], tx));
2665
+ _args.push(transactionArgumentOrPure(args[1], tx));
2666
+
2667
+ // @ts-ignore
2668
+ return tx.moveCall({
2669
+ target: "0xdee9::critbit::borrow_leaf_by_key",
2670
+ arguments: _args,
2671
+ typeArguments: [
2672
+ typeof typeArguments[0] === "string"
2673
+ ? typeArguments[0]
2674
+ : typeArguments[0].getSignature(),
2675
+ ],
2676
+ });
2677
+ }
2678
+ export function borrowMutLeafByIndex<T0 = any>(
2679
+ tx: TransactionBlock,
2680
+ args: [
2681
+ string | TransactionObjectArgument | TransactionArgument,
2682
+ bigint | TransactionArgument,
2683
+ ],
2684
+ typeArguments: [TypeDescriptor<T0> | string],
2685
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2686
+ const _args: any[] = [];
2687
+ _args.push(transactionArgumentOrObject(args[0], tx));
2688
+ _args.push(transactionArgumentOrPure(args[1], tx));
2689
+
2690
+ // @ts-ignore
2691
+ return tx.moveCall({
2692
+ target: "0xdee9::critbit::borrow_mut_leaf_by_index",
2693
+ arguments: _args,
2694
+ typeArguments: [
2695
+ typeof typeArguments[0] === "string"
2696
+ ? typeArguments[0]
2697
+ : typeArguments[0].getSignature(),
2698
+ ],
2699
+ });
2700
+ }
2701
+ export function destroyEmpty<T0 = any>(
2702
+ tx: TransactionBlock,
2703
+ args: [critbit.CritbitTree<T0> | TransactionArgument],
2704
+ typeArguments: [TypeDescriptor<T0> | string],
2705
+ ): TransactionArgument & [TransactionArgument] {
2706
+ const _args: any[] = [];
2707
+ _args.push(transactionArgumentOrPure(args[0], tx));
2708
+
2709
+ // @ts-ignore
2710
+ return tx.moveCall({
2711
+ target: "0xdee9::critbit::destroy_empty",
2712
+ arguments: _args,
2713
+ typeArguments: [
2714
+ typeof typeArguments[0] === "string"
2715
+ ? typeArguments[0]
2716
+ : typeArguments[0].getSignature(),
2717
+ ],
2718
+ });
2719
+ }
2720
+ export function drop<T0 = any>(
2721
+ tx: TransactionBlock,
2722
+ args: [critbit.CritbitTree<T0> | TransactionArgument],
2723
+ typeArguments: [TypeDescriptor<T0> | string],
2724
+ ): TransactionArgument & [TransactionArgument] {
2725
+ const _args: any[] = [];
2726
+ _args.push(transactionArgumentOrPure(args[0], tx));
2727
+
2728
+ // @ts-ignore
2729
+ return tx.moveCall({
2730
+ target: "0xdee9::critbit::drop",
2731
+ arguments: _args,
2732
+ typeArguments: [
2733
+ typeof typeArguments[0] === "string"
2734
+ ? typeArguments[0]
2735
+ : typeArguments[0].getSignature(),
2736
+ ],
2737
+ });
2738
+ }
2739
+ export function findClosestKey<T0 = any>(
2740
+ tx: TransactionBlock,
2741
+ args: [
2742
+ string | TransactionObjectArgument | TransactionArgument,
2743
+ bigint | TransactionArgument,
2744
+ ],
2745
+ typeArguments: [TypeDescriptor<T0> | string],
2746
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2747
+ const _args: any[] = [];
2748
+ _args.push(transactionArgumentOrObject(args[0], tx));
2749
+ _args.push(transactionArgumentOrPure(args[1], tx));
2750
+
2751
+ // @ts-ignore
2752
+ return tx.moveCall({
2753
+ target: "0xdee9::critbit::find_closest_key",
2754
+ arguments: _args,
2755
+ typeArguments: [
2756
+ typeof typeArguments[0] === "string"
2757
+ ? typeArguments[0]
2758
+ : typeArguments[0].getSignature(),
2759
+ ],
2760
+ });
2761
+ }
2762
+ export function findLeaf<T0 = any>(
2763
+ tx: TransactionBlock,
2764
+ args: [
2765
+ string | TransactionObjectArgument | TransactionArgument,
2766
+ bigint | TransactionArgument,
2767
+ ],
2768
+ typeArguments: [TypeDescriptor<T0> | string],
2769
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2770
+ const _args: any[] = [];
2771
+ _args.push(transactionArgumentOrObject(args[0], tx));
2772
+ _args.push(transactionArgumentOrPure(args[1], tx));
2773
+
2774
+ // @ts-ignore
2775
+ return tx.moveCall({
2776
+ target: "0xdee9::critbit::find_leaf",
2777
+ arguments: _args,
2778
+ typeArguments: [
2779
+ typeof typeArguments[0] === "string"
2780
+ ? typeArguments[0]
2781
+ : typeArguments[0].getSignature(),
2782
+ ],
2783
+ });
2784
+ }
2785
+ export function insertLeaf<T0 = any>(
2786
+ tx: TransactionBlock,
2787
+ args: [
2788
+ string | TransactionObjectArgument | TransactionArgument,
2789
+ bigint | TransactionArgument,
2790
+ T0 | TransactionArgument,
2791
+ ],
2792
+ typeArguments: [TypeDescriptor<T0> | string],
2793
+ ): TransactionArgument &
2794
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
2795
+ const _args: any[] = [];
2796
+ _args.push(transactionArgumentOrObject(args[0], tx));
2797
+ _args.push(transactionArgumentOrPure(args[1], tx));
2798
+ _args.push(transactionArgumentOrPure(args[2], tx));
2799
+
2800
+ // @ts-ignore
2801
+ return tx.moveCall({
2802
+ target: "0xdee9::critbit::insert_leaf",
2803
+ arguments: _args,
2804
+ typeArguments: [
2805
+ typeof typeArguments[0] === "string"
2806
+ ? typeArguments[0]
2807
+ : typeArguments[0].getSignature(),
2808
+ ],
2809
+ });
2810
+ }
2811
+ export function isEmpty<T0 = any>(
2812
+ tx: TransactionBlock,
2813
+ args: [string | TransactionObjectArgument | TransactionArgument],
2814
+ typeArguments: [TypeDescriptor<T0> | string],
2815
+ ): TransactionArgument & [TransactionArgument] {
2816
+ const _args: any[] = [];
2817
+ _args.push(transactionArgumentOrObject(args[0], tx));
2818
+
2819
+ // @ts-ignore
2820
+ return tx.moveCall({
2821
+ target: "0xdee9::critbit::is_empty",
2822
+ arguments: _args,
2823
+ typeArguments: [
2824
+ typeof typeArguments[0] === "string"
2825
+ ? typeArguments[0]
2826
+ : typeArguments[0].getSignature(),
2827
+ ],
2828
+ });
2829
+ }
2830
+ export function maxLeaf<T0 = any>(
2831
+ tx: TransactionBlock,
2832
+ args: [string | TransactionObjectArgument | TransactionArgument],
2833
+ typeArguments: [TypeDescriptor<T0> | string],
2834
+ ): TransactionArgument & [TransactionArgument] {
2835
+ const _args: any[] = [];
2836
+ _args.push(transactionArgumentOrObject(args[0], tx));
2837
+
2838
+ // @ts-ignore
2839
+ return tx.moveCall({
2840
+ target: "0xdee9::critbit::max_leaf",
2841
+ arguments: _args,
2842
+ typeArguments: [
2843
+ typeof typeArguments[0] === "string"
2844
+ ? typeArguments[0]
2845
+ : typeArguments[0].getSignature(),
2846
+ ],
2847
+ });
2848
+ }
2849
+ export function minLeaf<T0 = any>(
2850
+ tx: TransactionBlock,
2851
+ args: [string | TransactionObjectArgument | TransactionArgument],
2852
+ typeArguments: [TypeDescriptor<T0> | string],
2853
+ ): TransactionArgument & [TransactionArgument] {
2854
+ const _args: any[] = [];
2855
+ _args.push(transactionArgumentOrObject(args[0], tx));
2856
+
2857
+ // @ts-ignore
2858
+ return tx.moveCall({
2859
+ target: "0xdee9::critbit::min_leaf",
2860
+ arguments: _args,
2861
+ typeArguments: [
2862
+ typeof typeArguments[0] === "string"
2863
+ ? typeArguments[0]
2864
+ : typeArguments[0].getSignature(),
2865
+ ],
2866
+ });
2867
+ }
2868
+ export function new_<T0 = any>(
2869
+ tx: TransactionBlock,
2870
+ args: [],
2871
+ typeArguments: [TypeDescriptor<T0> | string],
2872
+ ): TransactionArgument & [] {
2873
+ const _args: any[] = [];
2874
+
2875
+ // @ts-ignore
2876
+ return tx.moveCall({
2877
+ target: "0xdee9::critbit::new",
2878
+ arguments: _args,
2879
+ typeArguments: [
2880
+ typeof typeArguments[0] === "string"
2881
+ ? typeArguments[0]
2882
+ : typeArguments[0].getSignature(),
2883
+ ],
2884
+ });
2885
+ }
2886
+ export function nextLeaf<T0 = any>(
2887
+ tx: TransactionBlock,
2888
+ args: [
2889
+ string | TransactionObjectArgument | TransactionArgument,
2890
+ bigint | TransactionArgument,
2891
+ ],
2892
+ typeArguments: [TypeDescriptor<T0> | string],
2893
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2894
+ const _args: any[] = [];
2895
+ _args.push(transactionArgumentOrObject(args[0], tx));
2896
+ _args.push(transactionArgumentOrPure(args[1], tx));
2897
+
2898
+ // @ts-ignore
2899
+ return tx.moveCall({
2900
+ target: "0xdee9::critbit::next_leaf",
2901
+ arguments: _args,
2902
+ typeArguments: [
2903
+ typeof typeArguments[0] === "string"
2904
+ ? typeArguments[0]
2905
+ : typeArguments[0].getSignature(),
2906
+ ],
2907
+ });
2908
+ }
2632
2909
  export function previousLeaf<T0 = any>(
2633
2910
  tx: TransactionBlock,
2634
2911
  args: [
@@ -2636,14 +2913,1280 @@ export namespace critbit {
2636
2913
  bigint | TransactionArgument,
2637
2914
  ],
2638
2915
  typeArguments: [TypeDescriptor<T0> | string],
2639
- ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2916
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2917
+ const _args: any[] = [];
2918
+ _args.push(transactionArgumentOrObject(args[0], tx));
2919
+ _args.push(transactionArgumentOrPure(args[1], tx));
2920
+
2921
+ // @ts-ignore
2922
+ return tx.moveCall({
2923
+ target: "0xdee9::critbit::previous_leaf",
2924
+ arguments: _args,
2925
+ typeArguments: [
2926
+ typeof typeArguments[0] === "string"
2927
+ ? typeArguments[0]
2928
+ : typeArguments[0].getSignature(),
2929
+ ],
2930
+ });
2931
+ }
2932
+ export function removeLeafByIndex<T0 = any>(
2933
+ tx: TransactionBlock,
2934
+ args: [
2935
+ string | TransactionObjectArgument | TransactionArgument,
2936
+ bigint | TransactionArgument,
2937
+ ],
2938
+ typeArguments: [TypeDescriptor<T0> | string],
2939
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2940
+ const _args: any[] = [];
2941
+ _args.push(transactionArgumentOrObject(args[0], tx));
2942
+ _args.push(transactionArgumentOrPure(args[1], tx));
2943
+
2944
+ // @ts-ignore
2945
+ return tx.moveCall({
2946
+ target: "0xdee9::critbit::remove_leaf_by_index",
2947
+ arguments: _args,
2948
+ typeArguments: [
2949
+ typeof typeArguments[0] === "string"
2950
+ ? typeArguments[0]
2951
+ : typeArguments[0].getSignature(),
2952
+ ],
2953
+ });
2954
+ }
2955
+ export function size<T0 = any>(
2956
+ tx: TransactionBlock,
2957
+ args: [string | TransactionObjectArgument | TransactionArgument],
2958
+ typeArguments: [TypeDescriptor<T0> | string],
2959
+ ): TransactionArgument & [TransactionArgument] {
2960
+ const _args: any[] = [];
2961
+ _args.push(transactionArgumentOrObject(args[0], tx));
2962
+
2963
+ // @ts-ignore
2964
+ return tx.moveCall({
2965
+ target: "0xdee9::critbit::size",
2966
+ arguments: _args,
2967
+ typeArguments: [
2968
+ typeof typeArguments[0] === "string"
2969
+ ? typeArguments[0]
2970
+ : typeArguments[0].getSignature(),
2971
+ ],
2972
+ });
2973
+ }
2974
+ }
2975
+ export namespace view {
2976
+ export async function borrowLeafByIndex<T0 = any>(
2977
+ client: SuiClient,
2978
+ args: [
2979
+ string | TransactionObjectArgument | TransactionArgument,
2980
+ bigint | TransactionArgument,
2981
+ ],
2982
+ typeArguments: [TypeDescriptor<T0> | string],
2983
+ ): Promise<TypedDevInspectResults<[string]>> {
2984
+ const tx = new TransactionBlock();
2985
+ builder.borrowLeafByIndex(tx, args, typeArguments);
2986
+ const inspectRes = await client.devInspectTransactionBlock({
2987
+ transactionBlock: tx,
2988
+ sender: ZERO_ADDRESS,
2989
+ });
2990
+
2991
+ return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
2992
+ inspectRes,
2993
+ );
2994
+ }
2995
+ export async function borrowLeafByKey<T0 = any>(
2996
+ client: SuiClient,
2997
+ args: [
2998
+ string | TransactionObjectArgument | TransactionArgument,
2999
+ bigint | TransactionArgument,
3000
+ ],
3001
+ typeArguments: [TypeDescriptor<T0> | string],
3002
+ ): Promise<TypedDevInspectResults<[string]>> {
3003
+ const tx = new TransactionBlock();
3004
+ builder.borrowLeafByKey(tx, args, typeArguments);
3005
+ const inspectRes = await client.devInspectTransactionBlock({
3006
+ transactionBlock: tx,
3007
+ sender: ZERO_ADDRESS,
3008
+ });
3009
+
3010
+ return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
3011
+ inspectRes,
3012
+ );
3013
+ }
3014
+ export async function borrowMutLeafByIndex<T0 = any>(
3015
+ client: SuiClient,
3016
+ args: [
3017
+ string | TransactionObjectArgument | TransactionArgument,
3018
+ bigint | TransactionArgument,
3019
+ ],
3020
+ typeArguments: [TypeDescriptor<T0> | string],
3021
+ ): Promise<TypedDevInspectResults<[string]>> {
3022
+ const tx = new TransactionBlock();
3023
+ builder.borrowMutLeafByIndex(tx, args, typeArguments);
3024
+ const inspectRes = await client.devInspectTransactionBlock({
3025
+ transactionBlock: tx,
3026
+ sender: ZERO_ADDRESS,
3027
+ });
3028
+
3029
+ return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
3030
+ inspectRes,
3031
+ );
3032
+ }
3033
+ export async function destroyEmpty<T0 = any>(
3034
+ client: SuiClient,
3035
+ args: [critbit.CritbitTree<T0> | TransactionArgument],
3036
+ typeArguments: [TypeDescriptor<T0> | string],
3037
+ ): Promise<TypedDevInspectResults<[]>> {
3038
+ const tx = new TransactionBlock();
3039
+ builder.destroyEmpty(tx, args, typeArguments);
3040
+ const inspectRes = await client.devInspectTransactionBlock({
3041
+ transactionBlock: tx,
3042
+ sender: ZERO_ADDRESS,
3043
+ });
3044
+
3045
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
3046
+ inspectRes,
3047
+ );
3048
+ }
3049
+ export async function drop<T0 = any>(
3050
+ client: SuiClient,
3051
+ args: [critbit.CritbitTree<T0> | TransactionArgument],
3052
+ typeArguments: [TypeDescriptor<T0> | string],
3053
+ ): Promise<TypedDevInspectResults<[]>> {
3054
+ const tx = new TransactionBlock();
3055
+ builder.drop(tx, args, typeArguments);
3056
+ const inspectRes = await client.devInspectTransactionBlock({
3057
+ transactionBlock: tx,
3058
+ sender: ZERO_ADDRESS,
3059
+ });
3060
+
3061
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
3062
+ inspectRes,
3063
+ );
3064
+ }
3065
+ export async function findClosestKey<T0 = any>(
3066
+ client: SuiClient,
3067
+ args: [
3068
+ string | TransactionObjectArgument | TransactionArgument,
3069
+ bigint | TransactionArgument,
3070
+ ],
3071
+ typeArguments: [TypeDescriptor<T0> | string],
3072
+ ): Promise<TypedDevInspectResults<[bigint]>> {
3073
+ const tx = new TransactionBlock();
3074
+ builder.findClosestKey(tx, args, typeArguments);
3075
+ const inspectRes = await client.devInspectTransactionBlock({
3076
+ transactionBlock: tx,
3077
+ sender: ZERO_ADDRESS,
3078
+ });
3079
+
3080
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
3081
+ inspectRes,
3082
+ );
3083
+ }
3084
+ export async function findLeaf<T0 = any>(
3085
+ client: SuiClient,
3086
+ args: [
3087
+ string | TransactionObjectArgument | TransactionArgument,
3088
+ bigint | TransactionArgument,
3089
+ ],
3090
+ typeArguments: [TypeDescriptor<T0> | string],
3091
+ ): Promise<TypedDevInspectResults<[Boolean, bigint]>> {
3092
+ const tx = new TransactionBlock();
3093
+ builder.findLeaf(tx, args, typeArguments);
3094
+ const inspectRes = await client.devInspectTransactionBlock({
3095
+ transactionBlock: tx,
3096
+ sender: ZERO_ADDRESS,
3097
+ });
3098
+
3099
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3100
+ [Boolean, bigint]
3101
+ >(inspectRes);
3102
+ }
3103
+ export async function insertLeaf<T0 = any>(
3104
+ client: SuiClient,
3105
+ args: [
3106
+ string | TransactionObjectArgument | TransactionArgument,
3107
+ bigint | TransactionArgument,
3108
+ T0 | TransactionArgument,
3109
+ ],
3110
+ typeArguments: [TypeDescriptor<T0> | string],
3111
+ ): Promise<TypedDevInspectResults<[bigint]>> {
3112
+ const tx = new TransactionBlock();
3113
+ builder.insertLeaf(tx, args, typeArguments);
3114
+ const inspectRes = await client.devInspectTransactionBlock({
3115
+ transactionBlock: tx,
3116
+ sender: ZERO_ADDRESS,
3117
+ });
3118
+
3119
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
3120
+ inspectRes,
3121
+ );
3122
+ }
3123
+ export async function isEmpty<T0 = any>(
3124
+ client: SuiClient,
3125
+ args: [string | TransactionObjectArgument | TransactionArgument],
3126
+ typeArguments: [TypeDescriptor<T0> | string],
3127
+ ): Promise<TypedDevInspectResults<[Boolean]>> {
3128
+ const tx = new TransactionBlock();
3129
+ builder.isEmpty(tx, args, typeArguments);
3130
+ const inspectRes = await client.devInspectTransactionBlock({
3131
+ transactionBlock: tx,
3132
+ sender: ZERO_ADDRESS,
3133
+ });
3134
+
3135
+ return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
3136
+ inspectRes,
3137
+ );
3138
+ }
3139
+ export async function maxLeaf<T0 = any>(
3140
+ client: SuiClient,
3141
+ args: [string | TransactionObjectArgument | TransactionArgument],
3142
+ typeArguments: [TypeDescriptor<T0> | string],
3143
+ ): Promise<TypedDevInspectResults<[bigint, bigint]>> {
3144
+ const tx = new TransactionBlock();
3145
+ builder.maxLeaf(tx, args, typeArguments);
3146
+ const inspectRes = await client.devInspectTransactionBlock({
3147
+ transactionBlock: tx,
3148
+ sender: ZERO_ADDRESS,
3149
+ });
3150
+
3151
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3152
+ [bigint, bigint]
3153
+ >(inspectRes);
3154
+ }
3155
+ export async function minLeaf<T0 = any>(
3156
+ client: SuiClient,
3157
+ args: [string | TransactionObjectArgument | TransactionArgument],
3158
+ typeArguments: [TypeDescriptor<T0> | string],
3159
+ ): Promise<TypedDevInspectResults<[bigint, bigint]>> {
3160
+ const tx = new TransactionBlock();
3161
+ builder.minLeaf(tx, args, typeArguments);
3162
+ const inspectRes = await client.devInspectTransactionBlock({
3163
+ transactionBlock: tx,
3164
+ sender: ZERO_ADDRESS,
3165
+ });
3166
+
3167
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3168
+ [bigint, bigint]
3169
+ >(inspectRes);
3170
+ }
3171
+ export async function new_<T0 = any>(
3172
+ client: SuiClient,
3173
+ args: [],
3174
+ typeArguments: [TypeDescriptor<T0> | string],
3175
+ ): Promise<TypedDevInspectResults<[critbit.CritbitTree<T0>]>> {
3176
+ const tx = new TransactionBlock();
3177
+ builder.new_(tx, args, typeArguments);
3178
+ const inspectRes = await client.devInspectTransactionBlock({
3179
+ transactionBlock: tx,
3180
+ sender: ZERO_ADDRESS,
3181
+ });
3182
+
3183
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3184
+ [critbit.CritbitTree<T0>]
3185
+ >(inspectRes);
3186
+ }
3187
+ export async function nextLeaf<T0 = any>(
3188
+ client: SuiClient,
3189
+ args: [
3190
+ string | TransactionObjectArgument | TransactionArgument,
3191
+ bigint | TransactionArgument,
3192
+ ],
3193
+ typeArguments: [TypeDescriptor<T0> | string],
3194
+ ): Promise<TypedDevInspectResults<[bigint, bigint]>> {
3195
+ const tx = new TransactionBlock();
3196
+ builder.nextLeaf(tx, args, typeArguments);
3197
+ const inspectRes = await client.devInspectTransactionBlock({
3198
+ transactionBlock: tx,
3199
+ sender: ZERO_ADDRESS,
3200
+ });
3201
+
3202
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3203
+ [bigint, bigint]
3204
+ >(inspectRes);
3205
+ }
3206
+ export async function previousLeaf<T0 = any>(
3207
+ client: SuiClient,
3208
+ args: [
3209
+ string | TransactionObjectArgument | TransactionArgument,
3210
+ bigint | TransactionArgument,
3211
+ ],
3212
+ typeArguments: [TypeDescriptor<T0> | string],
3213
+ ): Promise<TypedDevInspectResults<[bigint, bigint]>> {
3214
+ const tx = new TransactionBlock();
3215
+ builder.previousLeaf(tx, args, typeArguments);
3216
+ const inspectRes = await client.devInspectTransactionBlock({
3217
+ transactionBlock: tx,
3218
+ sender: ZERO_ADDRESS,
3219
+ });
3220
+
3221
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3222
+ [bigint, bigint]
3223
+ >(inspectRes);
3224
+ }
3225
+ export async function removeLeafByIndex<T0 = any>(
3226
+ client: SuiClient,
3227
+ args: [
3228
+ string | TransactionObjectArgument | TransactionArgument,
3229
+ bigint | TransactionArgument,
3230
+ ],
3231
+ typeArguments: [TypeDescriptor<T0> | string],
3232
+ ): Promise<TypedDevInspectResults<[T0]>> {
3233
+ const tx = new TransactionBlock();
3234
+ builder.removeLeafByIndex(tx, args, typeArguments);
3235
+ const inspectRes = await client.devInspectTransactionBlock({
3236
+ transactionBlock: tx,
3237
+ sender: ZERO_ADDRESS,
3238
+ });
3239
+
3240
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
3241
+ inspectRes,
3242
+ );
3243
+ }
3244
+ export async function size<T0 = any>(
3245
+ client: SuiClient,
3246
+ args: [string | TransactionObjectArgument | TransactionArgument],
3247
+ typeArguments: [TypeDescriptor<T0> | string],
3248
+ ): Promise<TypedDevInspectResults<[bigint]>> {
3249
+ const tx = new TransactionBlock();
3250
+ builder.size(tx, args, typeArguments);
3251
+ const inspectRes = await client.devInspectTransactionBlock({
3252
+ transactionBlock: tx,
3253
+ sender: ZERO_ADDRESS,
3254
+ });
3255
+
3256
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
3257
+ inspectRes,
3258
+ );
3259
+ }
3260
+ }
3261
+ }
3262
+
3263
+ export namespace custodian {
3264
+ export interface Account<T0> {
3265
+ available_balance: _0x2.balance.Balance<T0>;
3266
+ locked_balance: _0x2.balance.Balance<T0>;
3267
+ }
3268
+
3269
+ export namespace Account {
3270
+ export const TYPE_QNAME = "0xdee9::custodian::Account";
3271
+
3272
+ const TYPE = new TypeDescriptor<Account<any>>(Account.TYPE_QNAME);
3273
+
3274
+ export function type<T0>(
3275
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
3276
+ ): TypeDescriptor<Account<T0>> {
3277
+ return TYPE.apply(arg0);
3278
+ }
3279
+ }
3280
+
3281
+ export interface AccountCap {
3282
+ id: _0x2.object_.UID;
3283
+ }
3284
+
3285
+ export namespace AccountCap {
3286
+ export const TYPE_QNAME = "0xdee9::custodian::AccountCap";
3287
+
3288
+ const TYPE = new TypeDescriptor<AccountCap>(AccountCap.TYPE_QNAME);
3289
+
3290
+ export function type(): TypeDescriptor<AccountCap> {
3291
+ return TYPE.apply();
3292
+ }
3293
+ }
3294
+
3295
+ export interface Custodian<T0> {
3296
+ id: _0x2.object_.UID;
3297
+ account_balances: _0x2.table.Table<_0x2.object_.ID, custodian.Account<T0>>;
3298
+ }
3299
+
3300
+ export namespace Custodian {
3301
+ export const TYPE_QNAME = "0xdee9::custodian::Custodian";
3302
+
3303
+ const TYPE = new TypeDescriptor<Custodian<any>>(Custodian.TYPE_QNAME);
3304
+
3305
+ export function type<T0>(
3306
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
3307
+ ): TypeDescriptor<Custodian<T0>> {
3308
+ return TYPE.apply(arg0);
3309
+ }
3310
+ }
3311
+
3312
+ export namespace builder {
3313
+ export function accountAvailableBalance<T0 = any>(
3314
+ tx: TransactionBlock,
3315
+ args: [
3316
+ string | TransactionObjectArgument | TransactionArgument,
3317
+ _0x2.object_.ID | TransactionArgument,
3318
+ ],
3319
+ typeArguments: [TypeDescriptor<T0> | string],
3320
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3321
+ const _args: any[] = [];
3322
+ _args.push(transactionArgumentOrObject(args[0], tx));
3323
+ _args.push(transactionArgumentOrPure(args[1], tx));
3324
+
3325
+ // @ts-ignore
3326
+ return tx.moveCall({
3327
+ target: "0xdee9::custodian::account_available_balance",
3328
+ arguments: _args,
3329
+ typeArguments: [
3330
+ typeof typeArguments[0] === "string"
3331
+ ? typeArguments[0]
3332
+ : typeArguments[0].getSignature(),
3333
+ ],
3334
+ });
3335
+ }
3336
+ export function accountBalance<T0 = any>(
3337
+ tx: TransactionBlock,
3338
+ args: [
3339
+ string | TransactionObjectArgument | TransactionArgument,
3340
+ _0x2.object_.ID | TransactionArgument,
3341
+ ],
3342
+ typeArguments: [TypeDescriptor<T0> | string],
3343
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3344
+ const _args: any[] = [];
3345
+ _args.push(transactionArgumentOrObject(args[0], tx));
3346
+ _args.push(transactionArgumentOrPure(args[1], tx));
3347
+
3348
+ // @ts-ignore
3349
+ return tx.moveCall({
3350
+ target: "0xdee9::custodian::account_balance",
3351
+ arguments: _args,
3352
+ typeArguments: [
3353
+ typeof typeArguments[0] === "string"
3354
+ ? typeArguments[0]
3355
+ : typeArguments[0].getSignature(),
3356
+ ],
3357
+ });
3358
+ }
3359
+ export function accountLockedBalance<T0 = any>(
3360
+ tx: TransactionBlock,
3361
+ args: [
3362
+ string | TransactionObjectArgument | TransactionArgument,
3363
+ _0x2.object_.ID | TransactionArgument,
3364
+ ],
3365
+ typeArguments: [TypeDescriptor<T0> | string],
3366
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3367
+ const _args: any[] = [];
3368
+ _args.push(transactionArgumentOrObject(args[0], tx));
3369
+ _args.push(transactionArgumentOrPure(args[1], tx));
3370
+
3371
+ // @ts-ignore
3372
+ return tx.moveCall({
3373
+ target: "0xdee9::custodian::account_locked_balance",
3374
+ arguments: _args,
3375
+ typeArguments: [
3376
+ typeof typeArguments[0] === "string"
3377
+ ? typeArguments[0]
3378
+ : typeArguments[0].getSignature(),
3379
+ ],
3380
+ });
3381
+ }
3382
+ export function decreaseUserAvailableBalance<T0 = any>(
3383
+ tx: TransactionBlock,
3384
+ args: [
3385
+ string | TransactionObjectArgument | TransactionArgument,
3386
+ string | TransactionObjectArgument | TransactionArgument,
3387
+ bigint | TransactionArgument,
3388
+ ],
3389
+ typeArguments: [TypeDescriptor<T0> | string],
3390
+ ): TransactionArgument &
3391
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3392
+ const _args: any[] = [];
3393
+ _args.push(transactionArgumentOrObject(args[0], tx));
3394
+ _args.push(transactionArgumentOrObject(args[1], tx));
3395
+ _args.push(transactionArgumentOrPure(args[2], tx));
3396
+
3397
+ // @ts-ignore
3398
+ return tx.moveCall({
3399
+ target: "0xdee9::custodian::decrease_user_available_balance",
3400
+ arguments: _args,
3401
+ typeArguments: [
3402
+ typeof typeArguments[0] === "string"
3403
+ ? typeArguments[0]
3404
+ : typeArguments[0].getSignature(),
3405
+ ],
3406
+ });
3407
+ }
3408
+ export function decreaseUserLockedBalance<T0 = any>(
3409
+ tx: TransactionBlock,
3410
+ args: [
3411
+ string | TransactionObjectArgument | TransactionArgument,
3412
+ _0x2.object_.ID | TransactionArgument,
3413
+ bigint | TransactionArgument,
3414
+ ],
3415
+ typeArguments: [TypeDescriptor<T0> | string],
3416
+ ): TransactionArgument &
3417
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3418
+ const _args: any[] = [];
3419
+ _args.push(transactionArgumentOrObject(args[0], tx));
3420
+ _args.push(transactionArgumentOrPure(args[1], tx));
3421
+ _args.push(transactionArgumentOrPure(args[2], tx));
3422
+
3423
+ // @ts-ignore
3424
+ return tx.moveCall({
3425
+ target: "0xdee9::custodian::decrease_user_locked_balance",
3426
+ arguments: _args,
3427
+ typeArguments: [
3428
+ typeof typeArguments[0] === "string"
3429
+ ? typeArguments[0]
3430
+ : typeArguments[0].getSignature(),
3431
+ ],
3432
+ });
3433
+ }
3434
+ export function increaseUserAvailableBalance<T0 = any>(
3435
+ tx: TransactionBlock,
3436
+ args: [
3437
+ string | TransactionObjectArgument | TransactionArgument,
3438
+ _0x2.object_.ID | TransactionArgument,
3439
+ _0x2.balance.Balance<T0> | TransactionArgument,
3440
+ ],
3441
+ typeArguments: [TypeDescriptor<T0> | string],
3442
+ ): TransactionArgument &
3443
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3444
+ const _args: any[] = [];
3445
+ _args.push(transactionArgumentOrObject(args[0], tx));
3446
+ _args.push(transactionArgumentOrPure(args[1], tx));
3447
+ _args.push(transactionArgumentOrPure(args[2], tx));
3448
+
3449
+ // @ts-ignore
3450
+ return tx.moveCall({
3451
+ target: "0xdee9::custodian::increase_user_available_balance",
3452
+ arguments: _args,
3453
+ typeArguments: [
3454
+ typeof typeArguments[0] === "string"
3455
+ ? typeArguments[0]
3456
+ : typeArguments[0].getSignature(),
3457
+ ],
3458
+ });
3459
+ }
3460
+ export function increaseUserLockedBalance<T0 = any>(
3461
+ tx: TransactionBlock,
3462
+ args: [
3463
+ string | TransactionObjectArgument | TransactionArgument,
3464
+ string | TransactionObjectArgument | TransactionArgument,
3465
+ _0x2.balance.Balance<T0> | TransactionArgument,
3466
+ ],
3467
+ typeArguments: [TypeDescriptor<T0> | string],
3468
+ ): TransactionArgument &
3469
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3470
+ const _args: any[] = [];
3471
+ _args.push(transactionArgumentOrObject(args[0], tx));
3472
+ _args.push(transactionArgumentOrObject(args[1], tx));
3473
+ _args.push(transactionArgumentOrPure(args[2], tx));
3474
+
3475
+ // @ts-ignore
3476
+ return tx.moveCall({
3477
+ target: "0xdee9::custodian::increase_user_locked_balance",
3478
+ arguments: _args,
3479
+ typeArguments: [
3480
+ typeof typeArguments[0] === "string"
3481
+ ? typeArguments[0]
3482
+ : typeArguments[0].getSignature(),
3483
+ ],
3484
+ });
3485
+ }
3486
+ export function lockBalance<T0 = any>(
3487
+ tx: TransactionBlock,
3488
+ args: [
3489
+ string | TransactionObjectArgument | TransactionArgument,
3490
+ string | TransactionObjectArgument | TransactionArgument,
3491
+ bigint | TransactionArgument,
3492
+ ],
3493
+ typeArguments: [TypeDescriptor<T0> | string],
3494
+ ): TransactionArgument &
3495
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3496
+ const _args: any[] = [];
3497
+ _args.push(transactionArgumentOrObject(args[0], tx));
3498
+ _args.push(transactionArgumentOrObject(args[1], tx));
3499
+ _args.push(transactionArgumentOrPure(args[2], tx));
3500
+
3501
+ // @ts-ignore
3502
+ return tx.moveCall({
3503
+ target: "0xdee9::custodian::lock_balance",
3504
+ arguments: _args,
3505
+ typeArguments: [
3506
+ typeof typeArguments[0] === "string"
3507
+ ? typeArguments[0]
3508
+ : typeArguments[0].getSignature(),
3509
+ ],
3510
+ });
3511
+ }
3512
+ export function mintAccountCap(
3513
+ tx: TransactionBlock,
3514
+ args: [],
3515
+ ): TransactionArgument & [] {
3516
+ const _args: any[] = [];
3517
+
3518
+ // @ts-ignore
3519
+ return tx.moveCall({
3520
+ target: "0xdee9::custodian::mint_account_cap",
3521
+ arguments: _args,
3522
+ });
3523
+ }
3524
+ export function new_<T0 = any>(
3525
+ tx: TransactionBlock,
3526
+ args: [],
3527
+ typeArguments: [TypeDescriptor<T0> | string],
3528
+ ): TransactionArgument & [] {
3529
+ const _args: any[] = [];
3530
+
3531
+ // @ts-ignore
3532
+ return tx.moveCall({
3533
+ target: "0xdee9::custodian::new",
3534
+ arguments: _args,
3535
+ typeArguments: [
3536
+ typeof typeArguments[0] === "string"
3537
+ ? typeArguments[0]
3538
+ : typeArguments[0].getSignature(),
3539
+ ],
3540
+ });
3541
+ }
3542
+ export function unlockBalance<T0 = any>(
3543
+ tx: TransactionBlock,
3544
+ args: [
3545
+ string | TransactionObjectArgument | TransactionArgument,
3546
+ _0x2.object_.ID | TransactionArgument,
3547
+ bigint | TransactionArgument,
3548
+ ],
3549
+ typeArguments: [TypeDescriptor<T0> | string],
3550
+ ): TransactionArgument &
3551
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3552
+ const _args: any[] = [];
3553
+ _args.push(transactionArgumentOrObject(args[0], tx));
3554
+ _args.push(transactionArgumentOrPure(args[1], tx));
3555
+ _args.push(transactionArgumentOrPure(args[2], tx));
3556
+
3557
+ // @ts-ignore
3558
+ return tx.moveCall({
3559
+ target: "0xdee9::custodian::unlock_balance",
3560
+ arguments: _args,
3561
+ typeArguments: [
3562
+ typeof typeArguments[0] === "string"
3563
+ ? typeArguments[0]
3564
+ : typeArguments[0].getSignature(),
3565
+ ],
3566
+ });
3567
+ }
3568
+ export function withdrawAsset<T0 = any>(
3569
+ tx: TransactionBlock,
3570
+ args: [
3571
+ string | TransactionObjectArgument | TransactionArgument,
3572
+ bigint | TransactionArgument,
3573
+ string | TransactionObjectArgument | TransactionArgument,
3574
+ ],
3575
+ typeArguments: [TypeDescriptor<T0> | string],
3576
+ ): TransactionArgument &
3577
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3578
+ const _args: any[] = [];
3579
+ _args.push(transactionArgumentOrObject(args[0], tx));
3580
+ _args.push(transactionArgumentOrPure(args[1], tx));
3581
+ _args.push(transactionArgumentOrObject(args[2], tx));
3582
+
3583
+ // @ts-ignore
3584
+ return tx.moveCall({
3585
+ target: "0xdee9::custodian::withdraw_asset",
3586
+ arguments: _args,
3587
+ typeArguments: [
3588
+ typeof typeArguments[0] === "string"
3589
+ ? typeArguments[0]
3590
+ : typeArguments[0].getSignature(),
3591
+ ],
3592
+ });
3593
+ }
3594
+ }
3595
+ export namespace view {
3596
+ export async function accountAvailableBalance<T0 = any>(
3597
+ client: SuiClient,
3598
+ args: [
3599
+ string | TransactionObjectArgument | TransactionArgument,
3600
+ _0x2.object_.ID | TransactionArgument,
3601
+ ],
3602
+ typeArguments: [TypeDescriptor<T0> | string],
3603
+ ): Promise<TypedDevInspectResults<[bigint]>> {
3604
+ const tx = new TransactionBlock();
3605
+ builder.accountAvailableBalance(tx, args, typeArguments);
3606
+ const inspectRes = await client.devInspectTransactionBlock({
3607
+ transactionBlock: tx,
3608
+ sender: ZERO_ADDRESS,
3609
+ });
3610
+
3611
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
3612
+ inspectRes,
3613
+ );
3614
+ }
3615
+ export async function accountBalance<T0 = any>(
3616
+ client: SuiClient,
3617
+ args: [
3618
+ string | TransactionObjectArgument | TransactionArgument,
3619
+ _0x2.object_.ID | TransactionArgument,
3620
+ ],
3621
+ typeArguments: [TypeDescriptor<T0> | string],
3622
+ ): Promise<TypedDevInspectResults<[bigint, bigint]>> {
3623
+ const tx = new TransactionBlock();
3624
+ builder.accountBalance(tx, args, typeArguments);
3625
+ const inspectRes = await client.devInspectTransactionBlock({
3626
+ transactionBlock: tx,
3627
+ sender: ZERO_ADDRESS,
3628
+ });
3629
+
3630
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3631
+ [bigint, bigint]
3632
+ >(inspectRes);
3633
+ }
3634
+ export async function accountLockedBalance<T0 = any>(
3635
+ client: SuiClient,
3636
+ args: [
3637
+ string | TransactionObjectArgument | TransactionArgument,
3638
+ _0x2.object_.ID | TransactionArgument,
3639
+ ],
3640
+ typeArguments: [TypeDescriptor<T0> | string],
3641
+ ): Promise<TypedDevInspectResults<[bigint]>> {
3642
+ const tx = new TransactionBlock();
3643
+ builder.accountLockedBalance(tx, args, typeArguments);
3644
+ const inspectRes = await client.devInspectTransactionBlock({
3645
+ transactionBlock: tx,
3646
+ sender: ZERO_ADDRESS,
3647
+ });
3648
+
3649
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
3650
+ inspectRes,
3651
+ );
3652
+ }
3653
+ export async function decreaseUserAvailableBalance<T0 = any>(
3654
+ client: SuiClient,
3655
+ args: [
3656
+ string | TransactionObjectArgument | TransactionArgument,
3657
+ string | TransactionObjectArgument | TransactionArgument,
3658
+ bigint | TransactionArgument,
3659
+ ],
3660
+ typeArguments: [TypeDescriptor<T0> | string],
3661
+ ): Promise<TypedDevInspectResults<[_0x2.balance.Balance<T0>]>> {
3662
+ const tx = new TransactionBlock();
3663
+ builder.decreaseUserAvailableBalance(tx, args, typeArguments);
3664
+ const inspectRes = await client.devInspectTransactionBlock({
3665
+ transactionBlock: tx,
3666
+ sender: ZERO_ADDRESS,
3667
+ });
3668
+
3669
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3670
+ [_0x2.balance.Balance<T0>]
3671
+ >(inspectRes);
3672
+ }
3673
+ export async function decreaseUserLockedBalance<T0 = any>(
3674
+ client: SuiClient,
3675
+ args: [
3676
+ string | TransactionObjectArgument | TransactionArgument,
3677
+ _0x2.object_.ID | TransactionArgument,
3678
+ bigint | TransactionArgument,
3679
+ ],
3680
+ typeArguments: [TypeDescriptor<T0> | string],
3681
+ ): Promise<TypedDevInspectResults<[_0x2.balance.Balance<T0>]>> {
3682
+ const tx = new TransactionBlock();
3683
+ builder.decreaseUserLockedBalance(tx, args, typeArguments);
3684
+ const inspectRes = await client.devInspectTransactionBlock({
3685
+ transactionBlock: tx,
3686
+ sender: ZERO_ADDRESS,
3687
+ });
3688
+
3689
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3690
+ [_0x2.balance.Balance<T0>]
3691
+ >(inspectRes);
3692
+ }
3693
+ export async function increaseUserAvailableBalance<T0 = any>(
3694
+ client: SuiClient,
3695
+ args: [
3696
+ string | TransactionObjectArgument | TransactionArgument,
3697
+ _0x2.object_.ID | TransactionArgument,
3698
+ _0x2.balance.Balance<T0> | TransactionArgument,
3699
+ ],
3700
+ typeArguments: [TypeDescriptor<T0> | string],
3701
+ ): Promise<TypedDevInspectResults<[]>> {
3702
+ const tx = new TransactionBlock();
3703
+ builder.increaseUserAvailableBalance(tx, args, typeArguments);
3704
+ const inspectRes = await client.devInspectTransactionBlock({
3705
+ transactionBlock: tx,
3706
+ sender: ZERO_ADDRESS,
3707
+ });
3708
+
3709
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
3710
+ inspectRes,
3711
+ );
3712
+ }
3713
+ export async function increaseUserLockedBalance<T0 = any>(
3714
+ client: SuiClient,
3715
+ args: [
3716
+ string | TransactionObjectArgument | TransactionArgument,
3717
+ string | TransactionObjectArgument | TransactionArgument,
3718
+ _0x2.balance.Balance<T0> | TransactionArgument,
3719
+ ],
3720
+ typeArguments: [TypeDescriptor<T0> | string],
3721
+ ): Promise<TypedDevInspectResults<[]>> {
3722
+ const tx = new TransactionBlock();
3723
+ builder.increaseUserLockedBalance(tx, args, typeArguments);
3724
+ const inspectRes = await client.devInspectTransactionBlock({
3725
+ transactionBlock: tx,
3726
+ sender: ZERO_ADDRESS,
3727
+ });
3728
+
3729
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
3730
+ inspectRes,
3731
+ );
3732
+ }
3733
+ export async function lockBalance<T0 = any>(
3734
+ client: SuiClient,
3735
+ args: [
3736
+ string | TransactionObjectArgument | TransactionArgument,
3737
+ string | TransactionObjectArgument | TransactionArgument,
3738
+ bigint | TransactionArgument,
3739
+ ],
3740
+ typeArguments: [TypeDescriptor<T0> | string],
3741
+ ): Promise<TypedDevInspectResults<[]>> {
3742
+ const tx = new TransactionBlock();
3743
+ builder.lockBalance(tx, args, typeArguments);
3744
+ const inspectRes = await client.devInspectTransactionBlock({
3745
+ transactionBlock: tx,
3746
+ sender: ZERO_ADDRESS,
3747
+ });
3748
+
3749
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
3750
+ inspectRes,
3751
+ );
3752
+ }
3753
+ export async function mintAccountCap(
3754
+ client: SuiClient,
3755
+ args: [],
3756
+ ): Promise<TypedDevInspectResults<[custodian.AccountCap]>> {
3757
+ const tx = new TransactionBlock();
3758
+ builder.mintAccountCap(tx, args);
3759
+ const inspectRes = await client.devInspectTransactionBlock({
3760
+ transactionBlock: tx,
3761
+ sender: ZERO_ADDRESS,
3762
+ });
3763
+
3764
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3765
+ [custodian.AccountCap]
3766
+ >(inspectRes);
3767
+ }
3768
+ export async function new_<T0 = any>(
3769
+ client: SuiClient,
3770
+ args: [],
3771
+ typeArguments: [TypeDescriptor<T0> | string],
3772
+ ): Promise<TypedDevInspectResults<[custodian.Custodian<T0>]>> {
3773
+ const tx = new TransactionBlock();
3774
+ builder.new_(tx, args, typeArguments);
3775
+ const inspectRes = await client.devInspectTransactionBlock({
3776
+ transactionBlock: tx,
3777
+ sender: ZERO_ADDRESS,
3778
+ });
3779
+
3780
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3781
+ [custodian.Custodian<T0>]
3782
+ >(inspectRes);
3783
+ }
3784
+ export async function unlockBalance<T0 = any>(
3785
+ client: SuiClient,
3786
+ args: [
3787
+ string | TransactionObjectArgument | TransactionArgument,
3788
+ _0x2.object_.ID | TransactionArgument,
3789
+ bigint | TransactionArgument,
3790
+ ],
3791
+ typeArguments: [TypeDescriptor<T0> | string],
3792
+ ): Promise<TypedDevInspectResults<[]>> {
3793
+ const tx = new TransactionBlock();
3794
+ builder.unlockBalance(tx, args, typeArguments);
3795
+ const inspectRes = await client.devInspectTransactionBlock({
3796
+ transactionBlock: tx,
3797
+ sender: ZERO_ADDRESS,
3798
+ });
3799
+
3800
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
3801
+ inspectRes,
3802
+ );
3803
+ }
3804
+ export async function withdrawAsset<T0 = any>(
3805
+ client: SuiClient,
3806
+ args: [
3807
+ string | TransactionObjectArgument | TransactionArgument,
3808
+ bigint | TransactionArgument,
3809
+ string | TransactionObjectArgument | TransactionArgument,
3810
+ ],
3811
+ typeArguments: [TypeDescriptor<T0> | string],
3812
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
3813
+ const tx = new TransactionBlock();
3814
+ builder.withdrawAsset(tx, args, typeArguments);
3815
+ const inspectRes = await client.devInspectTransactionBlock({
3816
+ transactionBlock: tx,
3817
+ sender: ZERO_ADDRESS,
3818
+ });
3819
+
3820
+ return (await getMoveCoder(client)).decodeDevInspectResult<
3821
+ [_0x2.coin.Coin<T0>]
3822
+ >(inspectRes);
3823
+ }
3824
+ }
3825
+ }
3826
+
3827
+ export namespace custodian_v2 {
3828
+ export interface Account<T0> {
3829
+ available_balance: _0x2.balance.Balance<T0>;
3830
+ locked_balance: _0x2.balance.Balance<T0>;
3831
+ }
3832
+
3833
+ export namespace Account {
3834
+ export const TYPE_QNAME = "0xdee9::custodian_v2::Account";
3835
+
3836
+ const TYPE = new TypeDescriptor<Account<any>>(Account.TYPE_QNAME);
3837
+
3838
+ export function type<T0>(
3839
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
3840
+ ): TypeDescriptor<Account<T0>> {
3841
+ return TYPE.apply(arg0);
3842
+ }
3843
+ }
3844
+
3845
+ export interface AccountCap {
3846
+ id: _0x2.object_.UID;
3847
+ owner: string;
3848
+ }
3849
+
3850
+ export namespace AccountCap {
3851
+ export const TYPE_QNAME = "0xdee9::custodian_v2::AccountCap";
3852
+
3853
+ const TYPE = new TypeDescriptor<AccountCap>(AccountCap.TYPE_QNAME);
3854
+
3855
+ export function type(): TypeDescriptor<AccountCap> {
3856
+ return TYPE.apply();
3857
+ }
3858
+ }
3859
+
3860
+ export interface Custodian<T0> {
3861
+ id: _0x2.object_.UID;
3862
+ account_balances: _0x2.table.Table<string, custodian_v2.Account<T0>>;
3863
+ }
3864
+
3865
+ export namespace Custodian {
3866
+ export const TYPE_QNAME = "0xdee9::custodian_v2::Custodian";
3867
+
3868
+ const TYPE = new TypeDescriptor<Custodian<any>>(Custodian.TYPE_QNAME);
3869
+
3870
+ export function type<T0>(
3871
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
3872
+ ): TypeDescriptor<Custodian<T0>> {
3873
+ return TYPE.apply(arg0);
3874
+ }
3875
+ }
3876
+
3877
+ export namespace builder {
3878
+ export function accountAvailableBalance<T0 = any>(
3879
+ tx: TransactionBlock,
3880
+ args: [
3881
+ string | TransactionObjectArgument | TransactionArgument,
3882
+ string | TransactionArgument,
3883
+ ],
3884
+ typeArguments: [TypeDescriptor<T0> | string],
3885
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3886
+ const _args: any[] = [];
3887
+ _args.push(transactionArgumentOrObject(args[0], tx));
3888
+ _args.push(transactionArgumentOrPure(args[1], tx));
3889
+
3890
+ // @ts-ignore
3891
+ return tx.moveCall({
3892
+ target: "0xdee9::custodian_v2::account_available_balance",
3893
+ arguments: _args,
3894
+ typeArguments: [
3895
+ typeof typeArguments[0] === "string"
3896
+ ? typeArguments[0]
3897
+ : typeArguments[0].getSignature(),
3898
+ ],
3899
+ });
3900
+ }
3901
+ export function accountBalance<T0 = any>(
3902
+ tx: TransactionBlock,
3903
+ args: [
3904
+ string | TransactionObjectArgument | TransactionArgument,
3905
+ string | TransactionArgument,
3906
+ ],
3907
+ typeArguments: [TypeDescriptor<T0> | string],
3908
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3909
+ const _args: any[] = [];
3910
+ _args.push(transactionArgumentOrObject(args[0], tx));
3911
+ _args.push(transactionArgumentOrPure(args[1], tx));
3912
+
3913
+ // @ts-ignore
3914
+ return tx.moveCall({
3915
+ target: "0xdee9::custodian_v2::account_balance",
3916
+ arguments: _args,
3917
+ typeArguments: [
3918
+ typeof typeArguments[0] === "string"
3919
+ ? typeArguments[0]
3920
+ : typeArguments[0].getSignature(),
3921
+ ],
3922
+ });
3923
+ }
3924
+ export function accountLockedBalance<T0 = any>(
3925
+ tx: TransactionBlock,
3926
+ args: [
3927
+ string | TransactionObjectArgument | TransactionArgument,
3928
+ string | TransactionArgument,
3929
+ ],
3930
+ typeArguments: [TypeDescriptor<T0> | string],
3931
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3932
+ const _args: any[] = [];
3933
+ _args.push(transactionArgumentOrObject(args[0], tx));
3934
+ _args.push(transactionArgumentOrPure(args[1], tx));
3935
+
3936
+ // @ts-ignore
3937
+ return tx.moveCall({
3938
+ target: "0xdee9::custodian_v2::account_locked_balance",
3939
+ arguments: _args,
3940
+ typeArguments: [
3941
+ typeof typeArguments[0] === "string"
3942
+ ? typeArguments[0]
3943
+ : typeArguments[0].getSignature(),
3944
+ ],
3945
+ });
3946
+ }
3947
+ export function accountOwner(
3948
+ tx: TransactionBlock,
3949
+ args: [string | TransactionObjectArgument | TransactionArgument],
3950
+ ): TransactionArgument & [TransactionArgument] {
3951
+ const _args: any[] = [];
3952
+ _args.push(transactionArgumentOrObject(args[0], tx));
3953
+
3954
+ // @ts-ignore
3955
+ return tx.moveCall({
3956
+ target: "0xdee9::custodian_v2::account_owner",
3957
+ arguments: _args,
3958
+ });
3959
+ }
3960
+ export function createChildAccountCap(
3961
+ tx: TransactionBlock,
3962
+ args: [string | TransactionObjectArgument | TransactionArgument],
3963
+ ): TransactionArgument & [TransactionArgument] {
3964
+ const _args: any[] = [];
3965
+ _args.push(transactionArgumentOrObject(args[0], tx));
3966
+
3967
+ // @ts-ignore
3968
+ return tx.moveCall({
3969
+ target: "0xdee9::custodian_v2::create_child_account_cap",
3970
+ arguments: _args,
3971
+ });
3972
+ }
3973
+ export function decreaseUserAvailableBalance<T0 = any>(
3974
+ tx: TransactionBlock,
3975
+ args: [
3976
+ string | TransactionObjectArgument | TransactionArgument,
3977
+ string | TransactionObjectArgument | TransactionArgument,
3978
+ bigint | TransactionArgument,
3979
+ ],
3980
+ typeArguments: [TypeDescriptor<T0> | string],
3981
+ ): TransactionArgument &
3982
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
3983
+ const _args: any[] = [];
3984
+ _args.push(transactionArgumentOrObject(args[0], tx));
3985
+ _args.push(transactionArgumentOrObject(args[1], tx));
3986
+ _args.push(transactionArgumentOrPure(args[2], tx));
3987
+
3988
+ // @ts-ignore
3989
+ return tx.moveCall({
3990
+ target: "0xdee9::custodian_v2::decrease_user_available_balance",
3991
+ arguments: _args,
3992
+ typeArguments: [
3993
+ typeof typeArguments[0] === "string"
3994
+ ? typeArguments[0]
3995
+ : typeArguments[0].getSignature(),
3996
+ ],
3997
+ });
3998
+ }
3999
+ export function decreaseUserLockedBalance<T0 = any>(
4000
+ tx: TransactionBlock,
4001
+ args: [
4002
+ string | TransactionObjectArgument | TransactionArgument,
4003
+ string | TransactionArgument,
4004
+ bigint | TransactionArgument,
4005
+ ],
4006
+ typeArguments: [TypeDescriptor<T0> | string],
4007
+ ): TransactionArgument &
4008
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
4009
+ const _args: any[] = [];
4010
+ _args.push(transactionArgumentOrObject(args[0], tx));
4011
+ _args.push(transactionArgumentOrPure(args[1], tx));
4012
+ _args.push(transactionArgumentOrPure(args[2], tx));
4013
+
4014
+ // @ts-ignore
4015
+ return tx.moveCall({
4016
+ target: "0xdee9::custodian_v2::decrease_user_locked_balance",
4017
+ arguments: _args,
4018
+ typeArguments: [
4019
+ typeof typeArguments[0] === "string"
4020
+ ? typeArguments[0]
4021
+ : typeArguments[0].getSignature(),
4022
+ ],
4023
+ });
4024
+ }
4025
+ export function deleteAccountCap(
4026
+ tx: TransactionBlock,
4027
+ args: [custodian_v2.AccountCap | TransactionArgument],
4028
+ ): TransactionArgument & [TransactionArgument] {
4029
+ const _args: any[] = [];
4030
+ _args.push(transactionArgumentOrPure(args[0], tx));
4031
+
4032
+ // @ts-ignore
4033
+ return tx.moveCall({
4034
+ target: "0xdee9::custodian_v2::delete_account_cap",
4035
+ arguments: _args,
4036
+ });
4037
+ }
4038
+ export function increaseUserAvailableBalance<T0 = any>(
4039
+ tx: TransactionBlock,
4040
+ args: [
4041
+ string | TransactionObjectArgument | TransactionArgument,
4042
+ string | TransactionArgument,
4043
+ _0x2.balance.Balance<T0> | TransactionArgument,
4044
+ ],
4045
+ typeArguments: [TypeDescriptor<T0> | string],
4046
+ ): TransactionArgument &
4047
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
4048
+ const _args: any[] = [];
4049
+ _args.push(transactionArgumentOrObject(args[0], tx));
4050
+ _args.push(transactionArgumentOrPure(args[1], tx));
4051
+ _args.push(transactionArgumentOrPure(args[2], tx));
4052
+
4053
+ // @ts-ignore
4054
+ return tx.moveCall({
4055
+ target: "0xdee9::custodian_v2::increase_user_available_balance",
4056
+ arguments: _args,
4057
+ typeArguments: [
4058
+ typeof typeArguments[0] === "string"
4059
+ ? typeArguments[0]
4060
+ : typeArguments[0].getSignature(),
4061
+ ],
4062
+ });
4063
+ }
4064
+ export function increaseUserLockedBalance<T0 = any>(
4065
+ tx: TransactionBlock,
4066
+ args: [
4067
+ string | TransactionObjectArgument | TransactionArgument,
4068
+ string | TransactionObjectArgument | TransactionArgument,
4069
+ _0x2.balance.Balance<T0> | TransactionArgument,
4070
+ ],
4071
+ typeArguments: [TypeDescriptor<T0> | string],
4072
+ ): TransactionArgument &
4073
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
4074
+ const _args: any[] = [];
4075
+ _args.push(transactionArgumentOrObject(args[0], tx));
4076
+ _args.push(transactionArgumentOrObject(args[1], tx));
4077
+ _args.push(transactionArgumentOrPure(args[2], tx));
4078
+
4079
+ // @ts-ignore
4080
+ return tx.moveCall({
4081
+ target: "0xdee9::custodian_v2::increase_user_locked_balance",
4082
+ arguments: _args,
4083
+ typeArguments: [
4084
+ typeof typeArguments[0] === "string"
4085
+ ? typeArguments[0]
4086
+ : typeArguments[0].getSignature(),
4087
+ ],
4088
+ });
4089
+ }
4090
+ export function lockBalance<T0 = any>(
4091
+ tx: TransactionBlock,
4092
+ args: [
4093
+ string | TransactionObjectArgument | TransactionArgument,
4094
+ string | TransactionObjectArgument | TransactionArgument,
4095
+ bigint | TransactionArgument,
4096
+ ],
4097
+ typeArguments: [TypeDescriptor<T0> | string],
4098
+ ): TransactionArgument &
4099
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
4100
+ const _args: any[] = [];
4101
+ _args.push(transactionArgumentOrObject(args[0], tx));
4102
+ _args.push(transactionArgumentOrObject(args[1], tx));
4103
+ _args.push(transactionArgumentOrPure(args[2], tx));
4104
+
4105
+ // @ts-ignore
4106
+ return tx.moveCall({
4107
+ target: "0xdee9::custodian_v2::lock_balance",
4108
+ arguments: _args,
4109
+ typeArguments: [
4110
+ typeof typeArguments[0] === "string"
4111
+ ? typeArguments[0]
4112
+ : typeArguments[0].getSignature(),
4113
+ ],
4114
+ });
4115
+ }
4116
+ export function mintAccountCap(
4117
+ tx: TransactionBlock,
4118
+ args: [],
4119
+ ): TransactionArgument & [] {
4120
+ const _args: any[] = [];
4121
+
4122
+ // @ts-ignore
4123
+ return tx.moveCall({
4124
+ target: "0xdee9::custodian_v2::mint_account_cap",
4125
+ arguments: _args,
4126
+ });
4127
+ }
4128
+ export function new_<T0 = any>(
4129
+ tx: TransactionBlock,
4130
+ args: [],
4131
+ typeArguments: [TypeDescriptor<T0> | string],
4132
+ ): TransactionArgument & [] {
4133
+ const _args: any[] = [];
4134
+
4135
+ // @ts-ignore
4136
+ return tx.moveCall({
4137
+ target: "0xdee9::custodian_v2::new",
4138
+ arguments: _args,
4139
+ typeArguments: [
4140
+ typeof typeArguments[0] === "string"
4141
+ ? typeArguments[0]
4142
+ : typeArguments[0].getSignature(),
4143
+ ],
4144
+ });
4145
+ }
4146
+ export function unlockBalance<T0 = any>(
4147
+ tx: TransactionBlock,
4148
+ args: [
4149
+ string | TransactionObjectArgument | TransactionArgument,
4150
+ string | TransactionArgument,
4151
+ bigint | TransactionArgument,
4152
+ ],
4153
+ typeArguments: [TypeDescriptor<T0> | string],
4154
+ ): TransactionArgument &
4155
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
2640
4156
  const _args: any[] = [];
2641
4157
  _args.push(transactionArgumentOrObject(args[0], tx));
2642
4158
  _args.push(transactionArgumentOrPure(args[1], tx));
4159
+ _args.push(transactionArgumentOrPure(args[2], tx));
2643
4160
 
2644
4161
  // @ts-ignore
2645
4162
  return tx.moveCall({
2646
- target: "0xdee9::critbit::previous_leaf",
4163
+ target: "0xdee9::custodian_v2::unlock_balance",
4164
+ arguments: _args,
4165
+ typeArguments: [
4166
+ typeof typeArguments[0] === "string"
4167
+ ? typeArguments[0]
4168
+ : typeArguments[0].getSignature(),
4169
+ ],
4170
+ });
4171
+ }
4172
+ export function withdrawAsset<T0 = any>(
4173
+ tx: TransactionBlock,
4174
+ args: [
4175
+ string | TransactionObjectArgument | TransactionArgument,
4176
+ bigint | TransactionArgument,
4177
+ string | TransactionObjectArgument | TransactionArgument,
4178
+ ],
4179
+ typeArguments: [TypeDescriptor<T0> | string],
4180
+ ): TransactionArgument &
4181
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
4182
+ const _args: any[] = [];
4183
+ _args.push(transactionArgumentOrObject(args[0], tx));
4184
+ _args.push(transactionArgumentOrPure(args[1], tx));
4185
+ _args.push(transactionArgumentOrObject(args[2], tx));
4186
+
4187
+ // @ts-ignore
4188
+ return tx.moveCall({
4189
+ target: "0xdee9::custodian_v2::withdraw_asset",
2647
4190
  arguments: _args,
2648
4191
  typeArguments: [
2649
4192
  typeof typeArguments[0] === "string"
@@ -2654,16 +4197,35 @@ export namespace critbit {
2654
4197
  }
2655
4198
  }
2656
4199
  export namespace view {
2657
- export async function previousLeaf<T0 = any>(
4200
+ export async function accountAvailableBalance<T0 = any>(
2658
4201
  client: SuiClient,
2659
4202
  args: [
2660
4203
  string | TransactionObjectArgument | TransactionArgument,
2661
- bigint | TransactionArgument,
4204
+ string | TransactionArgument,
4205
+ ],
4206
+ typeArguments: [TypeDescriptor<T0> | string],
4207
+ ): Promise<TypedDevInspectResults<[bigint]>> {
4208
+ const tx = new TransactionBlock();
4209
+ builder.accountAvailableBalance(tx, args, typeArguments);
4210
+ const inspectRes = await client.devInspectTransactionBlock({
4211
+ transactionBlock: tx,
4212
+ sender: ZERO_ADDRESS,
4213
+ });
4214
+
4215
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
4216
+ inspectRes,
4217
+ );
4218
+ }
4219
+ export async function accountBalance<T0 = any>(
4220
+ client: SuiClient,
4221
+ args: [
4222
+ string | TransactionObjectArgument | TransactionArgument,
4223
+ string | TransactionArgument,
2662
4224
  ],
2663
4225
  typeArguments: [TypeDescriptor<T0> | string],
2664
4226
  ): Promise<TypedDevInspectResults<[bigint, bigint]>> {
2665
4227
  const tx = new TransactionBlock();
2666
- builder.previousLeaf(tx, args, typeArguments);
4228
+ builder.accountBalance(tx, args, typeArguments);
2667
4229
  const inspectRes = await client.devInspectTransactionBlock({
2668
4230
  transactionBlock: tx,
2669
4231
  sender: ZERO_ADDRESS,
@@ -2673,77 +4235,174 @@ export namespace critbit {
2673
4235
  [bigint, bigint]
2674
4236
  >(inspectRes);
2675
4237
  }
2676
- }
2677
- }
2678
-
2679
- export namespace custodian {
2680
- export interface Account<T0> {
2681
- available_balance: _0x2.balance.Balance<T0>;
2682
- locked_balance: _0x2.balance.Balance<T0>;
2683
- }
2684
-
2685
- export namespace Account {
2686
- export const TYPE_QNAME = "0xdee9::custodian::Account";
2687
-
2688
- const TYPE = new TypeDescriptor<Account<any>>(Account.TYPE_QNAME);
4238
+ export async function accountLockedBalance<T0 = any>(
4239
+ client: SuiClient,
4240
+ args: [
4241
+ string | TransactionObjectArgument | TransactionArgument,
4242
+ string | TransactionArgument,
4243
+ ],
4244
+ typeArguments: [TypeDescriptor<T0> | string],
4245
+ ): Promise<TypedDevInspectResults<[bigint]>> {
4246
+ const tx = new TransactionBlock();
4247
+ builder.accountLockedBalance(tx, args, typeArguments);
4248
+ const inspectRes = await client.devInspectTransactionBlock({
4249
+ transactionBlock: tx,
4250
+ sender: ZERO_ADDRESS,
4251
+ });
2689
4252
 
2690
- export function type<T0>(
2691
- arg0: TypeDescriptor<T0> = ANY_TYPE,
2692
- ): TypeDescriptor<Account<T0>> {
2693
- return TYPE.apply(arg0);
4253
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
4254
+ inspectRes,
4255
+ );
2694
4256
  }
2695
- }
2696
-
2697
- export interface AccountCap {
2698
- id: _0x2.object_.UID;
2699
- }
2700
-
2701
- export namespace AccountCap {
2702
- export const TYPE_QNAME = "0xdee9::custodian::AccountCap";
2703
-
2704
- const TYPE = new TypeDescriptor<AccountCap>(AccountCap.TYPE_QNAME);
4257
+ export async function accountOwner(
4258
+ client: SuiClient,
4259
+ args: [string | TransactionObjectArgument | TransactionArgument],
4260
+ ): Promise<TypedDevInspectResults<[string]>> {
4261
+ const tx = new TransactionBlock();
4262
+ builder.accountOwner(tx, args);
4263
+ const inspectRes = await client.devInspectTransactionBlock({
4264
+ transactionBlock: tx,
4265
+ sender: ZERO_ADDRESS,
4266
+ });
2705
4267
 
2706
- export function type(): TypeDescriptor<AccountCap> {
2707
- return TYPE.apply();
4268
+ return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
4269
+ inspectRes,
4270
+ );
2708
4271
  }
2709
- }
4272
+ export async function createChildAccountCap(
4273
+ client: SuiClient,
4274
+ args: [string | TransactionObjectArgument | TransactionArgument],
4275
+ ): Promise<TypedDevInspectResults<[custodian_v2.AccountCap]>> {
4276
+ const tx = new TransactionBlock();
4277
+ builder.createChildAccountCap(tx, args);
4278
+ const inspectRes = await client.devInspectTransactionBlock({
4279
+ transactionBlock: tx,
4280
+ sender: ZERO_ADDRESS,
4281
+ });
2710
4282
 
2711
- export interface Custodian<T0> {
2712
- id: _0x2.object_.UID;
2713
- account_balances: _0x2.table.Table<_0x2.object_.ID, custodian.Account<T0>>;
2714
- }
4283
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4284
+ [custodian_v2.AccountCap]
4285
+ >(inspectRes);
4286
+ }
4287
+ export async function decreaseUserAvailableBalance<T0 = any>(
4288
+ client: SuiClient,
4289
+ args: [
4290
+ string | TransactionObjectArgument | TransactionArgument,
4291
+ string | TransactionObjectArgument | TransactionArgument,
4292
+ bigint | TransactionArgument,
4293
+ ],
4294
+ typeArguments: [TypeDescriptor<T0> | string],
4295
+ ): Promise<TypedDevInspectResults<[_0x2.balance.Balance<T0>]>> {
4296
+ const tx = new TransactionBlock();
4297
+ builder.decreaseUserAvailableBalance(tx, args, typeArguments);
4298
+ const inspectRes = await client.devInspectTransactionBlock({
4299
+ transactionBlock: tx,
4300
+ sender: ZERO_ADDRESS,
4301
+ });
2715
4302
 
2716
- export namespace Custodian {
2717
- export const TYPE_QNAME = "0xdee9::custodian::Custodian";
4303
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4304
+ [_0x2.balance.Balance<T0>]
4305
+ >(inspectRes);
4306
+ }
4307
+ export async function decreaseUserLockedBalance<T0 = any>(
4308
+ client: SuiClient,
4309
+ args: [
4310
+ string | TransactionObjectArgument | TransactionArgument,
4311
+ string | TransactionArgument,
4312
+ bigint | TransactionArgument,
4313
+ ],
4314
+ typeArguments: [TypeDescriptor<T0> | string],
4315
+ ): Promise<TypedDevInspectResults<[_0x2.balance.Balance<T0>]>> {
4316
+ const tx = new TransactionBlock();
4317
+ builder.decreaseUserLockedBalance(tx, args, typeArguments);
4318
+ const inspectRes = await client.devInspectTransactionBlock({
4319
+ transactionBlock: tx,
4320
+ sender: ZERO_ADDRESS,
4321
+ });
2718
4322
 
2719
- const TYPE = new TypeDescriptor<Custodian<any>>(Custodian.TYPE_QNAME);
4323
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4324
+ [_0x2.balance.Balance<T0>]
4325
+ >(inspectRes);
4326
+ }
4327
+ export async function deleteAccountCap(
4328
+ client: SuiClient,
4329
+ args: [custodian_v2.AccountCap | TransactionArgument],
4330
+ ): Promise<TypedDevInspectResults<[]>> {
4331
+ const tx = new TransactionBlock();
4332
+ builder.deleteAccountCap(tx, args);
4333
+ const inspectRes = await client.devInspectTransactionBlock({
4334
+ transactionBlock: tx,
4335
+ sender: ZERO_ADDRESS,
4336
+ });
2720
4337
 
2721
- export function type<T0>(
2722
- arg0: TypeDescriptor<T0> = ANY_TYPE,
2723
- ): TypeDescriptor<Custodian<T0>> {
2724
- return TYPE.apply(arg0);
4338
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
4339
+ inspectRes,
4340
+ );
2725
4341
  }
2726
- }
4342
+ export async function increaseUserAvailableBalance<T0 = any>(
4343
+ client: SuiClient,
4344
+ args: [
4345
+ string | TransactionObjectArgument | TransactionArgument,
4346
+ string | TransactionArgument,
4347
+ _0x2.balance.Balance<T0> | TransactionArgument,
4348
+ ],
4349
+ typeArguments: [TypeDescriptor<T0> | string],
4350
+ ): Promise<TypedDevInspectResults<[]>> {
4351
+ const tx = new TransactionBlock();
4352
+ builder.increaseUserAvailableBalance(tx, args, typeArguments);
4353
+ const inspectRes = await client.devInspectTransactionBlock({
4354
+ transactionBlock: tx,
4355
+ sender: ZERO_ADDRESS,
4356
+ });
2727
4357
 
2728
- export namespace builder {
2729
- export function mintAccountCap(
2730
- tx: TransactionBlock,
2731
- args: [],
2732
- ): TransactionArgument & [] {
2733
- const _args: any[] = [];
4358
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
4359
+ inspectRes,
4360
+ );
4361
+ }
4362
+ export async function increaseUserLockedBalance<T0 = any>(
4363
+ client: SuiClient,
4364
+ args: [
4365
+ string | TransactionObjectArgument | TransactionArgument,
4366
+ string | TransactionObjectArgument | TransactionArgument,
4367
+ _0x2.balance.Balance<T0> | TransactionArgument,
4368
+ ],
4369
+ typeArguments: [TypeDescriptor<T0> | string],
4370
+ ): Promise<TypedDevInspectResults<[]>> {
4371
+ const tx = new TransactionBlock();
4372
+ builder.increaseUserLockedBalance(tx, args, typeArguments);
4373
+ const inspectRes = await client.devInspectTransactionBlock({
4374
+ transactionBlock: tx,
4375
+ sender: ZERO_ADDRESS,
4376
+ });
2734
4377
 
2735
- // @ts-ignore
2736
- return tx.moveCall({
2737
- target: "0xdee9::custodian::mint_account_cap",
2738
- arguments: _args,
4378
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
4379
+ inspectRes,
4380
+ );
4381
+ }
4382
+ export async function lockBalance<T0 = any>(
4383
+ client: SuiClient,
4384
+ args: [
4385
+ string | TransactionObjectArgument | TransactionArgument,
4386
+ string | TransactionObjectArgument | TransactionArgument,
4387
+ bigint | TransactionArgument,
4388
+ ],
4389
+ typeArguments: [TypeDescriptor<T0> | string],
4390
+ ): Promise<TypedDevInspectResults<[]>> {
4391
+ const tx = new TransactionBlock();
4392
+ builder.lockBalance(tx, args, typeArguments);
4393
+ const inspectRes = await client.devInspectTransactionBlock({
4394
+ transactionBlock: tx,
4395
+ sender: ZERO_ADDRESS,
2739
4396
  });
4397
+
4398
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
4399
+ inspectRes,
4400
+ );
2740
4401
  }
2741
- }
2742
- export namespace view {
2743
4402
  export async function mintAccountCap(
2744
4403
  client: SuiClient,
2745
4404
  args: [],
2746
- ): Promise<TypedDevInspectResults<[custodian.AccountCap]>> {
4405
+ ): Promise<TypedDevInspectResults<[custodian_v2.AccountCap]>> {
2747
4406
  const tx = new TransactionBlock();
2748
4407
  builder.mintAccountCap(tx, args);
2749
4408
  const inspectRes = await client.devInspectTransactionBlock({
@@ -2752,157 +4411,140 @@ export namespace custodian {
2752
4411
  });
2753
4412
 
2754
4413
  return (await getMoveCoder(client)).decodeDevInspectResult<
2755
- [custodian.AccountCap]
4414
+ [custodian_v2.AccountCap]
2756
4415
  >(inspectRes);
2757
4416
  }
2758
- }
2759
- }
2760
-
2761
- export namespace custodian_v2 {
2762
- export interface Account<T0> {
2763
- available_balance: _0x2.balance.Balance<T0>;
2764
- locked_balance: _0x2.balance.Balance<T0>;
2765
- }
2766
-
2767
- export namespace Account {
2768
- export const TYPE_QNAME = "0xdee9::custodian_v2::Account";
2769
-
2770
- const TYPE = new TypeDescriptor<Account<any>>(Account.TYPE_QNAME);
4417
+ export async function new_<T0 = any>(
4418
+ client: SuiClient,
4419
+ args: [],
4420
+ typeArguments: [TypeDescriptor<T0> | string],
4421
+ ): Promise<TypedDevInspectResults<[custodian_v2.Custodian<T0>]>> {
4422
+ const tx = new TransactionBlock();
4423
+ builder.new_(tx, args, typeArguments);
4424
+ const inspectRes = await client.devInspectTransactionBlock({
4425
+ transactionBlock: tx,
4426
+ sender: ZERO_ADDRESS,
4427
+ });
2771
4428
 
2772
- export function type<T0>(
2773
- arg0: TypeDescriptor<T0> = ANY_TYPE,
2774
- ): TypeDescriptor<Account<T0>> {
2775
- return TYPE.apply(arg0);
4429
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4430
+ [custodian_v2.Custodian<T0>]
4431
+ >(inspectRes);
2776
4432
  }
2777
- }
2778
-
2779
- export interface AccountCap {
2780
- id: _0x2.object_.UID;
2781
- owner: string;
2782
- }
2783
-
2784
- export namespace AccountCap {
2785
- export const TYPE_QNAME = "0xdee9::custodian_v2::AccountCap";
2786
-
2787
- const TYPE = new TypeDescriptor<AccountCap>(AccountCap.TYPE_QNAME);
4433
+ export async function unlockBalance<T0 = any>(
4434
+ client: SuiClient,
4435
+ args: [
4436
+ string | TransactionObjectArgument | TransactionArgument,
4437
+ string | TransactionArgument,
4438
+ bigint | TransactionArgument,
4439
+ ],
4440
+ typeArguments: [TypeDescriptor<T0> | string],
4441
+ ): Promise<TypedDevInspectResults<[]>> {
4442
+ const tx = new TransactionBlock();
4443
+ builder.unlockBalance(tx, args, typeArguments);
4444
+ const inspectRes = await client.devInspectTransactionBlock({
4445
+ transactionBlock: tx,
4446
+ sender: ZERO_ADDRESS,
4447
+ });
2788
4448
 
2789
- export function type(): TypeDescriptor<AccountCap> {
2790
- return TYPE.apply();
4449
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
4450
+ inspectRes,
4451
+ );
2791
4452
  }
2792
- }
2793
-
2794
- export interface Custodian<T0> {
2795
- id: _0x2.object_.UID;
2796
- account_balances: _0x2.table.Table<string, custodian_v2.Account<T0>>;
2797
- }
2798
-
2799
- export namespace Custodian {
2800
- export const TYPE_QNAME = "0xdee9::custodian_v2::Custodian";
2801
-
2802
- const TYPE = new TypeDescriptor<Custodian<any>>(Custodian.TYPE_QNAME);
4453
+ export async function withdrawAsset<T0 = any>(
4454
+ client: SuiClient,
4455
+ args: [
4456
+ string | TransactionObjectArgument | TransactionArgument,
4457
+ bigint | TransactionArgument,
4458
+ string | TransactionObjectArgument | TransactionArgument,
4459
+ ],
4460
+ typeArguments: [TypeDescriptor<T0> | string],
4461
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
4462
+ const tx = new TransactionBlock();
4463
+ builder.withdrawAsset(tx, args, typeArguments);
4464
+ const inspectRes = await client.devInspectTransactionBlock({
4465
+ transactionBlock: tx,
4466
+ sender: ZERO_ADDRESS,
4467
+ });
2803
4468
 
2804
- export function type<T0>(
2805
- arg0: TypeDescriptor<T0> = ANY_TYPE,
2806
- ): TypeDescriptor<Custodian<T0>> {
2807
- return TYPE.apply(arg0);
4469
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4470
+ [_0x2.coin.Coin<T0>]
4471
+ >(inspectRes);
2808
4472
  }
2809
4473
  }
4474
+ }
2810
4475
 
4476
+ export namespace math {
2811
4477
  export namespace builder {
2812
- export function accountOwner(
4478
+ export function countLeadingZeros(
2813
4479
  tx: TransactionBlock,
2814
- args: [string | TransactionObjectArgument | TransactionArgument],
4480
+ args: [bigint | TransactionArgument],
2815
4481
  ): TransactionArgument & [TransactionArgument] {
2816
4482
  const _args: any[] = [];
2817
- _args.push(transactionArgumentOrObject(args[0], tx));
4483
+ _args.push(transactionArgumentOrPure(args[0], tx));
2818
4484
 
2819
4485
  // @ts-ignore
2820
4486
  return tx.moveCall({
2821
- target: "0xdee9::custodian_v2::account_owner",
4487
+ target: "0xdee9::math::count_leading_zeros",
2822
4488
  arguments: _args,
2823
4489
  });
2824
4490
  }
2825
- export function createChildAccountCap(
4491
+ export function divRound(
2826
4492
  tx: TransactionBlock,
2827
- args: [string | TransactionObjectArgument | TransactionArgument],
2828
- ): TransactionArgument & [TransactionArgument] {
4493
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4494
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2829
4495
  const _args: any[] = [];
2830
- _args.push(transactionArgumentOrObject(args[0], tx));
4496
+ _args.push(transactionArgumentOrPure(args[0], tx));
4497
+ _args.push(transactionArgumentOrPure(args[1], tx));
2831
4498
 
2832
4499
  // @ts-ignore
2833
4500
  return tx.moveCall({
2834
- target: "0xdee9::custodian_v2::create_child_account_cap",
4501
+ target: "0xdee9::math::div_round",
2835
4502
  arguments: _args,
2836
4503
  });
2837
4504
  }
2838
-
2839
- export function deleteAccountCap(
4505
+ export function mul(
2840
4506
  tx: TransactionBlock,
2841
- args: [custodian_v2.AccountCap | TransactionArgument],
2842
- ): TransactionArgument & [TransactionArgument] {
4507
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4508
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2843
4509
  const _args: any[] = [];
2844
4510
  _args.push(transactionArgumentOrPure(args[0], tx));
4511
+ _args.push(transactionArgumentOrPure(args[1], tx));
2845
4512
 
2846
4513
  // @ts-ignore
2847
4514
  return tx.moveCall({
2848
- target: "0xdee9::custodian_v2::delete_account_cap",
4515
+ target: "0xdee9::math::mul",
2849
4516
  arguments: _args,
2850
4517
  });
2851
4518
  }
2852
- }
2853
- export namespace view {
2854
- export async function accountOwner(
2855
- client: SuiClient,
2856
- args: [string | TransactionObjectArgument | TransactionArgument],
2857
- ): Promise<TypedDevInspectResults<[string]>> {
2858
- const tx = new TransactionBlock();
2859
- builder.accountOwner(tx, args);
2860
- const inspectRes = await client.devInspectTransactionBlock({
2861
- transactionBlock: tx,
2862
- sender: ZERO_ADDRESS,
2863
- });
4519
+ export function mulRound(
4520
+ tx: TransactionBlock,
4521
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4522
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
4523
+ const _args: any[] = [];
4524
+ _args.push(transactionArgumentOrPure(args[0], tx));
4525
+ _args.push(transactionArgumentOrPure(args[1], tx));
2864
4526
 
2865
- return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
2866
- inspectRes,
2867
- );
2868
- }
2869
- export async function createChildAccountCap(
2870
- client: SuiClient,
2871
- args: [string | TransactionObjectArgument | TransactionArgument],
2872
- ): Promise<TypedDevInspectResults<[custodian_v2.AccountCap]>> {
2873
- const tx = new TransactionBlock();
2874
- builder.createChildAccountCap(tx, args);
2875
- const inspectRes = await client.devInspectTransactionBlock({
2876
- transactionBlock: tx,
2877
- sender: ZERO_ADDRESS,
4527
+ // @ts-ignore
4528
+ return tx.moveCall({
4529
+ target: "0xdee9::math::mul_round",
4530
+ arguments: _args,
2878
4531
  });
2879
-
2880
- return (await getMoveCoder(client)).decodeDevInspectResult<
2881
- [custodian_v2.AccountCap]
2882
- >(inspectRes);
2883
4532
  }
4533
+ export function unsafeDiv(
4534
+ tx: TransactionBlock,
4535
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4536
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
4537
+ const _args: any[] = [];
4538
+ _args.push(transactionArgumentOrPure(args[0], tx));
4539
+ _args.push(transactionArgumentOrPure(args[1], tx));
2884
4540
 
2885
- export async function deleteAccountCap(
2886
- client: SuiClient,
2887
- args: [custodian_v2.AccountCap | TransactionArgument],
2888
- ): Promise<TypedDevInspectResults<[]>> {
2889
- const tx = new TransactionBlock();
2890
- builder.deleteAccountCap(tx, args);
2891
- const inspectRes = await client.devInspectTransactionBlock({
2892
- transactionBlock: tx,
2893
- sender: ZERO_ADDRESS,
4541
+ // @ts-ignore
4542
+ return tx.moveCall({
4543
+ target: "0xdee9::math::unsafe_div",
4544
+ arguments: _args,
2894
4545
  });
2895
-
2896
- return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2897
- inspectRes,
2898
- );
2899
4546
  }
2900
- }
2901
- }
2902
-
2903
- export namespace math {
2904
- export namespace builder {
2905
- export function divRound(
4547
+ export function unsafeDivRound(
2906
4548
  tx: TransactionBlock,
2907
4549
  args: [bigint | TransactionArgument, bigint | TransactionArgument],
2908
4550
  ): TransactionArgument & [TransactionArgument, TransactionArgument] {
@@ -2912,11 +4554,11 @@ export namespace math {
2912
4554
 
2913
4555
  // @ts-ignore
2914
4556
  return tx.moveCall({
2915
- target: "0xdee9::math::div_round",
4557
+ target: "0xdee9::math::unsafe_div_round",
2916
4558
  arguments: _args,
2917
4559
  });
2918
4560
  }
2919
- export function mul(
4561
+ export function unsafeMul(
2920
4562
  tx: TransactionBlock,
2921
4563
  args: [bigint | TransactionArgument, bigint | TransactionArgument],
2922
4564
  ): TransactionArgument & [TransactionArgument, TransactionArgument] {
@@ -2926,11 +4568,11 @@ export namespace math {
2926
4568
 
2927
4569
  // @ts-ignore
2928
4570
  return tx.moveCall({
2929
- target: "0xdee9::math::mul",
4571
+ target: "0xdee9::math::unsafe_mul",
2930
4572
  arguments: _args,
2931
4573
  });
2932
4574
  }
2933
- export function mulRound(
4575
+ export function unsafeMulRound(
2934
4576
  tx: TransactionBlock,
2935
4577
  args: [bigint | TransactionArgument, bigint | TransactionArgument],
2936
4578
  ): TransactionArgument & [TransactionArgument, TransactionArgument] {
@@ -2940,12 +4582,27 @@ export namespace math {
2940
4582
 
2941
4583
  // @ts-ignore
2942
4584
  return tx.moveCall({
2943
- target: "0xdee9::math::mul_round",
4585
+ target: "0xdee9::math::unsafe_mul_round",
2944
4586
  arguments: _args,
2945
4587
  });
2946
4588
  }
2947
4589
  }
2948
4590
  export namespace view {
4591
+ export async function countLeadingZeros(
4592
+ client: SuiClient,
4593
+ args: [bigint | TransactionArgument],
4594
+ ): Promise<TypedDevInspectResults<[number]>> {
4595
+ const tx = new TransactionBlock();
4596
+ builder.countLeadingZeros(tx, args);
4597
+ const inspectRes = await client.devInspectTransactionBlock({
4598
+ transactionBlock: tx,
4599
+ sender: ZERO_ADDRESS,
4600
+ });
4601
+
4602
+ return (await getMoveCoder(client)).decodeDevInspectResult<[number]>(
4603
+ inspectRes,
4604
+ );
4605
+ }
2949
4606
  export async function divRound(
2950
4607
  client: SuiClient,
2951
4608
  args: [bigint | TransactionArgument, bigint | TransactionArgument],
@@ -2987,6 +4644,66 @@ export namespace math {
2987
4644
  sender: ZERO_ADDRESS,
2988
4645
  });
2989
4646
 
4647
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4648
+ [Boolean, bigint]
4649
+ >(inspectRes);
4650
+ }
4651
+ export async function unsafeDiv(
4652
+ client: SuiClient,
4653
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4654
+ ): Promise<TypedDevInspectResults<[bigint]>> {
4655
+ const tx = new TransactionBlock();
4656
+ builder.unsafeDiv(tx, args);
4657
+ const inspectRes = await client.devInspectTransactionBlock({
4658
+ transactionBlock: tx,
4659
+ sender: ZERO_ADDRESS,
4660
+ });
4661
+
4662
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
4663
+ inspectRes,
4664
+ );
4665
+ }
4666
+ export async function unsafeDivRound(
4667
+ client: SuiClient,
4668
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4669
+ ): Promise<TypedDevInspectResults<[Boolean, bigint]>> {
4670
+ const tx = new TransactionBlock();
4671
+ builder.unsafeDivRound(tx, args);
4672
+ const inspectRes = await client.devInspectTransactionBlock({
4673
+ transactionBlock: tx,
4674
+ sender: ZERO_ADDRESS,
4675
+ });
4676
+
4677
+ return (await getMoveCoder(client)).decodeDevInspectResult<
4678
+ [Boolean, bigint]
4679
+ >(inspectRes);
4680
+ }
4681
+ export async function unsafeMul(
4682
+ client: SuiClient,
4683
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4684
+ ): Promise<TypedDevInspectResults<[bigint]>> {
4685
+ const tx = new TransactionBlock();
4686
+ builder.unsafeMul(tx, args);
4687
+ const inspectRes = await client.devInspectTransactionBlock({
4688
+ transactionBlock: tx,
4689
+ sender: ZERO_ADDRESS,
4690
+ });
4691
+
4692
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
4693
+ inspectRes,
4694
+ );
4695
+ }
4696
+ export async function unsafeMulRound(
4697
+ client: SuiClient,
4698
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
4699
+ ): Promise<TypedDevInspectResults<[Boolean, bigint]>> {
4700
+ const tx = new TransactionBlock();
4701
+ builder.unsafeMulRound(tx, args);
4702
+ const inspectRes = await client.devInspectTransactionBlock({
4703
+ transactionBlock: tx,
4704
+ sender: ZERO_ADDRESS,
4705
+ });
4706
+
2990
4707
  return (await getMoveCoder(client)).decodeDevInspectResult<
2991
4708
  [Boolean, bigint]
2992
4709
  >(inspectRes);