-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getConnectionInfo in the view of the primary chain #9718
Changes from all commits
a2ea1fe
7c2b3c8
451d09d
a6133fc
646243b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import { M } from '@endo/patterns'; | |
|
||
/** | ||
* @import {TypedPattern} from '@agoric/internal'; | ||
* @import {CosmosChainInfo} from './cosmos-api.js'; | ||
* @import {ChainInfo, CosmosChainInfo} from './types.js'; | ||
*/ | ||
|
||
/** | ||
|
@@ -81,9 +81,7 @@ export const IBCConnectionInfoShape = M.splitRecord({ | |
transferChannel: IBCChannelInfoShape, | ||
}); | ||
|
||
/** | ||
* @type {TypedPattern<CosmosChainInfo>} | ||
*/ | ||
/** @type {TypedPattern<CosmosChainInfo>} */ | ||
export const CosmosChainInfoShape = M.splitRecord( | ||
{ | ||
chainId: M.string(), | ||
|
@@ -96,11 +94,13 @@ export const CosmosChainInfoShape = M.splitRecord( | |
}, | ||
); | ||
|
||
// FIXME more validation | ||
export const ChainInfoShape = M.any(); | ||
/** @type {TypedPattern<ChainInfo>} */ | ||
export const ChainInfoShape = M.splitRecord({ | ||
chainId: M.string(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe out of scope, but consider including a
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of scope and I think it won't work |
||
}); | ||
export const LocalChainAccountShape = M.remotable('LocalChainAccount'); | ||
export const DenomShape = M.string(); | ||
// FIXME more validation | ||
// TODO define for #9211 | ||
export const BrandInfoShape = M.any(); | ||
|
||
export const DenomAmountShape = { denom: DenomShape, value: M.bigint() }; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This I am a little confused by - is it necessary for the
hotnewchain
scenario, since we can't be certain they will give usnoramlizedConnInfo
? It would seemorchestration-proposal.js
has everything normalized already at this point.I wonder if it's better to throw if
chainId1
>chainId2
so the user knows how they need to specify the perspective ofconnectionInfo
. Alternatively, maybe a parameter name change would do the trick.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would not be reliable.
Agree, I'll improve the docs.