-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: chain account kit cleanup (#9818)
refs: #9064 ## Description - remove getBalance, getBalances, getPurse from IcaAccountKit - cleanup TODO surrounding `UNPARSABLE_CHAIN_ADDRESS` - rename `ChainAccountKit` -> `IcaAccountKit` - `findAddressField` should treat an empty string as an `UNPARSABLE_ADDRESS` - improve testing coverage for `IcaAccount.getPort()` - docs: update exo classDiagram ### Security Considerations n/a ### Scaling Considerations n/a ### Documentation Considerations n/a ### Testing Considerations n/a ### Upgrade Considerations n/a
- Loading branch information
Showing
11 changed files
with
154 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,123 @@ | ||
# Exo structure | ||
|
||
As of 2024-05-29… | ||
Last verified 2024-07-31 | ||
|
||
```mermaid | ||
classDiagram | ||
%% Orchestration vat business logic (Zoe) | ||
LCAKit --* LocalchainAccount | ||
ICQConnectionKit --* Port | ||
ICQConnectionKit --* Connection | ||
ChainAccountKit --* Port | ||
ChainAccountKit --* Connection | ||
StakingAccountKit --* IcaAccount | ||
class ChainAccountKit { | ||
ICQConnection --* Port | ||
ICQConnection --* Connection | ||
IcaAccount --* Port | ||
IcaAccount --* Connection | ||
IcaAccount --* CosmosInterchainService | ||
ICQConnection --* CosmosInterchainService | ||
CosmosInterchainService --* PortAllocator | ||
PortAllocator --* NetworkVat | ||
LocalChainAccount --* LocalChainVat | ||
class IcaAccount { | ||
port: Port | ||
connection: Connection | ||
localAddress: LocalIbcAddress | ||
requestedRemoteAddress: string | ||
remoteAddress: RemoteIbcAddress | ||
chainAddress: ChainAddress | ||
getAddress() | ||
getLocalAddress() | ||
getRemoteAddress() | ||
getPort() | ||
executeTx() | ||
executeEncodedTx() | ||
close() | ||
} | ||
class ICQConnectionKit { | ||
class ICQConnection { | ||
port: Port | ||
connection: Connection | ||
localAddress: LocalIbcAddress | ||
remoteAddress: RemoteIbcAddress | ||
getLocalAddress() | ||
getRemoteAddress() | ||
query() | ||
} | ||
class StakingAccountKit { | ||
chainAddress: ChainAddress | ||
bondDenom: string | ||
account: ICAAccount | ||
timer: Timer | ||
topicKit: TopicKit | ||
makeTransferInvitation() | ||
class CosmosInterchainService { | ||
portAllocator: PortAllocator | ||
icqConnections: MapStore<ConnectionVersionKey, ICQConnection> | ||
sharedICQPort: Port | ||
makeAccount() | ||
provideICQConnection() | ||
} | ||
%% In other vats | ||
class LCAKit { | ||
account: LocalChainAccount | ||
address: ChainAddress | ||
topicKit: RecorderKit<LocalChainAccountNotification> | ||
class Port { | ||
getLocalAddress() | ||
addListener() | ||
connect() | ||
removeListener() | ||
revoke() | ||
} | ||
class LocalchainAccount { | ||
executeTx() | ||
deposit() | ||
withdraw() | ||
class Connection { | ||
getLocalAddress() | ||
getRemoteAddress() | ||
send() | ||
close() | ||
} | ||
class IcaAccount { | ||
executeTx() | ||
deposit() | ||
getPurse() | ||
close() | ||
class PortAllocator { | ||
allocateCustomIBCPort() | ||
allocateICAControllerPort() | ||
allocateICQControllerPort() | ||
} | ||
class LocalChainAccount { | ||
deposit() | ||
executeTx() | ||
getBalance() | ||
withdraw() | ||
executeTx() | ||
monitorTransfers() | ||
} | ||
%% In api consumer vats | ||
LocalOrchestrationAccount --* LocalChainAccount | ||
CosmosOrchestrationAccount --* IcaAccount | ||
class LocalOrchestrationAccount { | ||
account: LocalChainAccount | ||
address: ChainAddress | ||
topicKit: RecorderKit<OrchestrationAccountNotification> | ||
asContinuingOffer() | ||
delegate() | ||
deposit() | ||
executeTx() | ||
getAddress() | ||
getBalance() | ||
getPublicTopics() | ||
monitorTransfers() | ||
send() | ||
transfer() | ||
undelegate() | ||
withdraw() | ||
} | ||
class CosmosOrchestrationAccount { | ||
account: LocalChainAccount | ||
bondDenom: string | ||
chainAddress: ChainAddress | ||
icqConnection: ICQConnection | undefined | ||
timer: Timer | ||
topicKit: RecorderKit<OrchestrationAccountNotification> | ||
asContinuingOffer() | ||
delegate() | ||
executeEncodedTx() | ||
getAddress() | ||
getBalance() | ||
getPublicTopics() | ||
redelegate() | ||
undelegate() | ||
withdrawReward() | ||
} | ||
``` |
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
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.