@swapkit/toolboxes 4.0.0-beta.37 → 4.0.0-beta.39

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/src/tron/types.ts CHANGED
@@ -29,3 +29,70 @@ export interface TronCreateTransactionParams
29
29
  extends Omit<GenericCreateTransactionParams, "feeRate"> {
30
30
  // No additional fields needed - all inherited from GenericCreateTransactionParams
31
31
  }
32
+
33
+ // TronGrid API Types
34
+ export type TronGridTRC20Balance = Array<{
35
+ [contractAddress: string]: string; // Balance as string
36
+ }>;
37
+
38
+ export interface TronGridAccountResponse {
39
+ data: Array<{
40
+ address: string;
41
+ balance: number; // TRX balance in SUN
42
+ create_time: number;
43
+ latest_opration_time: number; // Note: typo in API response
44
+ free_net_usage: number;
45
+ net_window_size: number;
46
+ net_window_optimized: boolean;
47
+ trc20: TronGridTRC20Balance;
48
+ assetV2?: Array<{
49
+ key: string;
50
+ value: number;
51
+ }>;
52
+ frozenV2?: Array<{
53
+ type?: string;
54
+ }>;
55
+ free_asset_net_usageV2?: Array<{
56
+ key: string;
57
+ value: number;
58
+ }>;
59
+ latest_consume_free_time?: number;
60
+ owner_permission?: {
61
+ keys: Array<{
62
+ address: string;
63
+ weight: number;
64
+ }>;
65
+ threshold: number;
66
+ permission_name: string;
67
+ };
68
+ active_permission?: Array<{
69
+ operations: string;
70
+ keys: Array<{
71
+ address: string;
72
+ weight: number;
73
+ }>;
74
+ threshold: number;
75
+ id: number;
76
+ type: string;
77
+ permission_name: string;
78
+ }>;
79
+ account_resource?: {
80
+ energy_window_optimized: boolean;
81
+ energy_window_size: number;
82
+ };
83
+ }>;
84
+ success: boolean;
85
+ meta: {
86
+ at: number;
87
+ page_size: number;
88
+ };
89
+ }
90
+
91
+ export interface TronGridTokenInfo {
92
+ symbol: string;
93
+ address: string;
94
+ decimals: number;
95
+ name: string;
96
+ totalSupply: string;
97
+ owner: string;
98
+ }
@@ -1,5 +0,0 @@
1
- import"./chunk-s47y8512.js";import{AssetValue as c,BaseDecimal as p}from"@swapkit/helpers";import{SwapKitApi as u}from"@swapkit/helpers/api";var l=typeof process!=="undefined"&&process.pid?process.pid.toString(36):"",a=0;function g(){function t(){let e=Date.now(),n=a||e;return a=n,e>a?e:n+1}return l+t().toString(36)}function w(t){return async function e(n,i=!0){return(await u.getChainBalance({chain:t,address:n,scamFilter:i})).map(({identifier:r,value:o,decimal:s})=>{return new c({decimal:s||p[t],value:o,identifier:r})})}}export{g as uniqid,w as getBalance};
2
- export{g as a,w as b};
3
-
4
- //# debugId=8C6F04B3BE4067A464756E2164756E21
5
- //# sourceMappingURL=chunk-6f98phv2.js.map