Skip to content

Commit

Permalink
fixup! chore(types): Orchestration continuing offers
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jul 11, 2024
1 parent 051064f commit 4d54c56
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { orchestrationAccountMethods } from '../utils/orchestrationAccount.js';
* @import {Zone} from '@agoric/zone';
* @import {ResponseQuery} from '@agoric/cosmic-proto/tendermint/abci/types.js';
* @import {JsonSafe} from '@agoric/cosmic-proto';
* @import {Matcher} from '@endo/patterns';
*/

const trace = makeTracer('ComosOrchestrationAccountHolder');
Expand Down Expand Up @@ -83,7 +84,7 @@ export const IcaAccountHolderI = M.interface('IcaAccountHolder', {
undelegate: M.call(M.arrayOf(DelegationShape)).returns(VowShape),
});

/** @type {{ [name: string]: [description: string, valueShape: Pattern] }} */
/** @type {{ [name: string]: [description: string, valueShape: Matcher] }} */
const PUBLIC_TOPICS = {
account: ['Staking Account holder status', M.any()],
};
Expand Down Expand Up @@ -160,7 +161,6 @@ export const prepareCosmosOrchestrationAccountKit = (
(chainAddress, bondDenom, io) => {
const { storageNode, ...rest } = io;
// must be the fully synchronous maker because the kit is held in durable state
// @ts-expect-error XXX Patterns
const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1]);
// TODO determine what goes in vstorage https://github.com/Agoric/agoric-sdk/issues/9066
void E(topicKit.recorder).write('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { makeTimestampHelper } from '../utils/time.js';
* @import {TimerService, TimerBrand, TimestampRecord} from '@agoric/time';
* @import {PromiseVow, Vow, VowTools} from '@agoric/vow';
* @import {TypedJson, JsonSafe} from '@agoric/cosmic-proto';
* @import {Matcher} from '@endo/patterns';
* @import {ChainHub} from './chain-hub.js';
*/

Expand Down Expand Up @@ -59,7 +60,7 @@ const HolderI = M.interface('holder', {
executeTx: M.call(M.arrayOf(M.record())).returns(Vow$(M.record())),
});

/** @type {{ [name: string]: [description: string, valueShape: Pattern] }} */
/** @type {{ [name: string]: [description: string, valueShape: Matcher] }} */
const PUBLIC_TOPICS = {
account: ['Account holder status', M.any()],
};
Expand Down Expand Up @@ -138,7 +139,6 @@ export const prepareLocalOrchestrationAccountKit = (
*/
({ account, address, storageNode }) => {
// must be the fully synchronous maker because the kit is held in durable state
// @ts-expect-error XXX Patterns
const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1]);
// TODO determine what goes in vstorage https://github.com/Agoric/agoric-sdk/issues/9066
void E(topicKit.recorder).write('');
Expand Down
15 changes: 3 additions & 12 deletions packages/orchestration/src/orchestration-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,15 @@
* - should remain relatively stable.
*/
import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
import type { Timestamp } from '@agoric/time';
import type {
ContinuingOfferResult,
InvitationMakers,
} from '@agoric/smart-wallet/src/types.js';
import type {
ResolvedPublicTopic,
TopicsRecord,
} from '@agoric/zoe/src/contractSupport/topics.js';
import type { CurrentWalletRecord } from '@agoric/smart-wallet/src/smartWallet.js';
import type { StoredFacet } from '@agoric/internal/src/lib-chainStorage.js';
import type { Timestamp } from '@agoric/time';
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
import type {
ChainInfo,
CosmosChainAccountMethods,
CosmosChainInfo,
IBCMsgTransferOptions,
IcaAccount,
KnownChains,
LocalAccountMethods,
} from './types.js';
Expand Down
5 changes: 4 additions & 1 deletion packages/zoe/src/contractSupport/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export const PublicTopicShape = M.splitRecord(
*/

/**
* A {PublicTopic} in which the `storagePath` is a string.
* A {PublicTopic} in which the `storagePath` is always a resolved string.
*
* Useful when working with Vows and async-flow.
*
* @template {object} T topic value
* @typedef {{
* description?: string,
Expand Down

0 comments on commit 4d54c56

Please sign in to comment.