@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/dist/chunk-0h4xdrwz.js +5 -0
- package/dist/{chunk-6f98phv2.js.map → chunk-0h4xdrwz.js.map} +2 -2
- package/dist/{chunk-5yxc1e69.js → chunk-fjfxga2v.js} +2 -2
- package/dist/{chunk-5yxc1e69.js.map → chunk-fjfxga2v.js.map} +1 -1
- package/dist/src/cosmos/index.cjs +2 -2
- package/dist/src/cosmos/index.cjs.map +4 -4
- package/dist/src/cosmos/index.js +2 -2
- package/dist/src/cosmos/index.js.map +4 -4
- package/dist/src/evm/index.js +1 -1
- package/dist/src/tron/index.cjs +2 -2
- package/dist/src/tron/index.cjs.map +6 -5
- package/dist/src/tron/index.js +2 -2
- package/dist/src/tron/index.js.map +6 -5
- package/dist/src/utxo/index.js +1 -1
- package/package.json +5 -5
- package/src/cosmos/toolbox/cosmos.ts +6 -1
- package/src/cosmos/util.ts +1 -1
- package/src/tron/helpers/trongrid.ts +54 -0
- package/src/tron/toolbox.ts +122 -33
- package/src/tron/types.ts +67 -0
- package/dist/chunk-6f98phv2.js +0 -5
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
|
+
}
|
package/dist/chunk-6f98phv2.js
DELETED
|
@@ -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
|