@ledgerhq/coin-evm 5.3.9 → 5.4.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.
- package/CHANGELOG.md +12 -0
- package/lib/logic/getStakes.d.ts.map +1 -1
- package/lib/logic/getStakes.js +6 -2
- package/lib/logic/getStakes.js.map +1 -1
- package/lib/staking/contracts.d.ts.map +1 -1
- package/lib/staking/contracts.js +4 -0
- package/lib/staking/contracts.js.map +1 -1
- package/lib/staking/index.d.ts +1 -0
- package/lib/staking/index.d.ts.map +1 -1
- package/lib/staking/index.js +3 -1
- package/lib/staking/index.js.map +1 -1
- package/lib/staking/unbondings.d.ts +8 -0
- package/lib/staking/unbondings.d.ts.map +1 -0
- package/lib/staking/unbondings.js +114 -0
- package/lib/staking/unbondings.js.map +1 -0
- package/lib/types/staking.d.ts +17 -0
- package/lib/types/staking.d.ts.map +1 -1
- package/lib-es/logic/getStakes.d.ts.map +1 -1
- package/lib-es/logic/getStakes.js +6 -2
- package/lib-es/logic/getStakes.js.map +1 -1
- package/lib-es/staking/contracts.d.ts.map +1 -1
- package/lib-es/staking/contracts.js +4 -0
- package/lib-es/staking/contracts.js.map +1 -1
- package/lib-es/staking/index.d.ts +1 -0
- package/lib-es/staking/index.d.ts.map +1 -1
- package/lib-es/staking/index.js +1 -0
- package/lib-es/staking/index.js.map +1 -1
- package/lib-es/staking/unbondings.d.ts +8 -0
- package/lib-es/staking/unbondings.d.ts.map +1 -0
- package/lib-es/staking/unbondings.js +108 -0
- package/lib-es/staking/unbondings.js.map +1 -0
- package/lib-es/types/staking.d.ts +17 -0
- package/lib-es/types/staking.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/{index.arc_testnet.integ.test.ts → index.arc.integ.test.ts} +15 -12
- package/src/logic/getStakes.test.ts +84 -0
- package/src/logic/getStakes.ts +12 -8
- package/src/staking/contracts.ts +4 -0
- package/src/staking/index.ts +1 -0
- package/src/staking/unbondings.test.ts +245 -0
- package/src/staking/unbondings.ts +137 -0
- package/src/types/staking.ts +18 -0
package/src/types/staking.ts
CHANGED
|
@@ -44,6 +44,22 @@ export type RedelegationStrategy =
|
|
|
44
44
|
}
|
|
45
45
|
| { type: 'none' }
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Per-chain strategy for fetching pending unbondings from an off-chain source.
|
|
49
|
+
*
|
|
50
|
+
* - `cosmos-rest`: Cosmos REST API, EVM address resolved via
|
|
51
|
+
* `apiConfig.precompileAddress`. Needed because the staking precompile
|
|
52
|
+
* exposes only active delegations.
|
|
53
|
+
* - `none`: pending unbondings are not surfaced.
|
|
54
|
+
*/
|
|
55
|
+
export type UnbondingStrategy =
|
|
56
|
+
| {
|
|
57
|
+
type: 'cosmos-rest'
|
|
58
|
+
/** REST endpoint template; `{address}` is replaced with the resolved Cosmos address. */
|
|
59
|
+
endpoint: string
|
|
60
|
+
}
|
|
61
|
+
| { type: 'none' }
|
|
62
|
+
|
|
47
63
|
/**
|
|
48
64
|
* Per-chain strategy for fetching pending delegation rewards.
|
|
49
65
|
*
|
|
@@ -134,6 +150,8 @@ export type StakingContractConfig = {
|
|
|
134
150
|
}
|
|
135
151
|
/** How to fetch active redelegations from an off-chain source. Defaults to `"none"` when absent. */
|
|
136
152
|
redelegationStrategy?: RedelegationStrategy
|
|
153
|
+
/** How to fetch pending unbondings from an off-chain source. Defaults to `"none"` when absent. */
|
|
154
|
+
unbondingStrategy?: UnbondingStrategy
|
|
137
155
|
/** How to fetch pending delegation rewards from an off-chain source. Defaults to `"none"` when absent. */
|
|
138
156
|
rewardsStrategy?: RewardsStrategy
|
|
139
157
|
/** How to recover a REWARD op's amount from its tx receipt logs. Absent → REWARD ops keep their native value. */
|