Skip to content

Commit

Permalink
chore(types): LOA implements LocalAccountMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Oct 2, 2024
1 parent d97c7b0 commit 31e82eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/orchestration/src/examples/stake-bld.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export const start = async (zcf, privateArgs, baggage) => {
const { give } = seat.getProposal();
trace('makeStakeBldInvitation', give);
const { holder } = await makeLocalAccountKit();
/** @type {Record<string, Payment<'nat'>>} */
// @ts-expect-error XXX PaymentPKeywordRecord throught deeplyFulfilled will be a PaymnentKeywordRecord
const { In } = await deeplyFulfilled(
withdrawFromSeat(zcf, seat, give),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js';
/**
* @import {HostOf} from '@agoric/async-flow';
* @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js';
* @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI} from '@agoric/orchestration';
* @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI, LocalAccountMethods} from '@agoric/orchestration';
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
* @import {Zone} from '@agoric/zone';
* @import {Remote} from '@agoric/internal';
Expand Down Expand Up @@ -613,14 +613,14 @@ export const prepareLocalOrchestrationAccountKit = (
* updater will get a special notification that the account is being
* transferred.
*/
/** @type {HostOf<LocalChainAccount['deposit']>} */
/** @type {HostOf<LocalAccountMethods['deposit']>} */
deposit(payment) {
return watch(
E(this.state.account).deposit(payment),
this.facets.returnVoidWatcher,
);
},
/** @type {HostOf<LocalChainAccount['withdraw']>} */
/** @type {HostOf<LocalAccountMethods['withdraw']>} */
withdraw(amount) {
return watch(E(this.state.account).withdraw(amount));
},
Expand Down Expand Up @@ -733,7 +733,7 @@ export const prepareLocalOrchestrationAccountKit = (
matchFirstPacket(patternV) {
return watch(E(this.state.packetTools).matchFirstPacket(patternV));
},
/** @type {HostOf<LocalChainAccount['monitorTransfers']>} */
/** @type {HostOf<LocalAccountMethods['monitorTransfers']>} */
monitorTransfers(tap) {
return watch(E(this.state.packetTools).monitorTransfers(tap));
},
Expand Down

0 comments on commit 31e82eb

Please sign in to comment.