-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk-coin-baby): add sdk support for babylon native staking
TICKET: SC-1276
- Loading branch information
Showing
15 changed files
with
755 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
modules/sdk-coin-baby/src/lib/EpochedStakingActivateBuilder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as constants from './constants'; | ||
import { StakingActivateBuilder } from '@bitgo/abstract-cosmos'; | ||
|
||
export class EpochedStakingActivateBuilder extends StakingActivateBuilder { | ||
/** @inheritdoc */ | ||
messages(delegateMessages: Parameters<StakingActivateBuilder['messages']>[0]): this { | ||
super.messages(delegateMessages); | ||
this._messages.forEach((message) => (message.typeUrl = constants.wrappedDelegateMsgTypeUrl)); | ||
return this; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/sdk-coin-baby/src/lib/EpochedStakingDeactivateBuilder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as constants from './constants'; | ||
import { StakingDeactivateBuilder } from '@bitgo/abstract-cosmos'; | ||
|
||
export class EpochedStakingDeactivateBuilder extends StakingDeactivateBuilder { | ||
/** @inheritdoc */ | ||
messages(undelegateMessages: Parameters<StakingDeactivateBuilder['messages']>[0]): this { | ||
super.messages(undelegateMessages); | ||
this._messages.forEach((message) => (message.typeUrl = constants.wrappedUndelegateMsgTypeUrl)); | ||
return this; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/sdk-coin-baby/src/lib/EpochedStakingRedelegateBuilder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as constants from './constants'; | ||
import { StakingRedelegateBuilder } from '@bitgo/abstract-cosmos'; | ||
|
||
export class EpochedStakingRedelegateBuilder extends StakingRedelegateBuilder { | ||
/** @inheritdoc */ | ||
messages(redelegateMessages: Parameters<StakingRedelegateBuilder['messages']>[0]): this { | ||
super.messages(redelegateMessages); | ||
this._messages.forEach((message) => (message.typeUrl = constants.wrappedBeginRedelegateTypeUrl)); | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.