@agoric/orchestration 0.1.1-dev-00afafb.0 → 0.1.1-dev-bfa47d1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -15
- package/src/cosmos-api.d.ts +7 -1
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +8 -1
- package/src/examples/sendAnywhere.contract.d.ts.map +1 -1
- package/src/examples/sendAnywhere.contract.js +2 -0
- package/src/examples/stakeBld.contract.d.ts +3 -3
- package/src/examples/stakeIca.contract.d.ts +0 -1
- package/src/examples/stakeIca.contract.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.d.ts +0 -2
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +2 -10
- package/src/exos/local-chain-facade.d.ts +1 -1
- package/src/exos/local-orchestration-account.d.ts +3 -3
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +10 -5
- package/src/exos/remote-chain-facade.d.ts +0 -2
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/orchestration-api.d.ts +1 -6
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +0 -5
- package/src/proposals/start-stakeAtom.d.ts +0 -1
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.d.ts +3 -3
- package/src/proposals/start-stakeOsmo.d.ts +0 -1
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
- package/src/typeGuards.d.ts +4 -0
- package/src/typeGuards.js +6 -0
- package/src/utils/orchestrationAccount.d.ts +0 -1
- package/src/utils/orchestrationAccount.js +0 -2
- package/src/utils/time.d.ts +1 -1
- package/src/utils/time.d.ts.map +1 -1
- package/src/utils/time.js +1 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-bfa47d1.0+bfa47d1",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/async-flow": "0.1.1-dev-
|
|
37
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/network": "0.1.1-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/time": "0.3.3-dev-
|
|
44
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
45
|
-
"@agoric/vats": "0.15.2-dev-
|
|
46
|
-
"@agoric/vow": "0.1.1-dev-
|
|
47
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
48
|
-
"@agoric/zone": "0.2.3-dev-
|
|
36
|
+
"@agoric/async-flow": "0.1.1-dev-bfa47d1.0+bfa47d1",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-bfa47d1.0+bfa47d1",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-bfa47d1.0+bfa47d1",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-bfa47d1.0+bfa47d1",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-bfa47d1.0+bfa47d1",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-bfa47d1.0+bfa47d1",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-bfa47d1.0+bfa47d1",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-bfa47d1.0+bfa47d1",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-bfa47d1.0+bfa47d1",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-bfa47d1.0+bfa47d1",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-bfa47d1.0+bfa47d1",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-bfa47d1.0+bfa47d1",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-bfa47d1.0+bfa47d1",
|
|
49
49
|
"@endo/base64": "^1.0.5",
|
|
50
50
|
"@endo/errors": "^1.2.2",
|
|
51
51
|
"@endo/far": "^1.1.2",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"typeCoverage": {
|
|
91
91
|
"atLeast": 97.1
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "bfa47d1ff808f5b752544a2b3c70a11aa8e7ddfc"
|
|
94
94
|
}
|
package/src/cosmos-api.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
|
4
4
|
import { MsgTransfer } from '@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js';
|
|
5
5
|
import type { State as IBCChannelState, Order } from '@agoric/cosmic-proto/ibc/core/channel/v1/channel.js';
|
|
6
6
|
import type { State as IBCConnectionState } from '@agoric/cosmic-proto/ibc/core/connection/v1/connection.js';
|
|
7
|
-
import type { Brand, Purse } from '@agoric/ertp/src/types.js';
|
|
7
|
+
import type { Brand, Purse, Payment, Amount } from '@agoric/ertp/src/types.js';
|
|
8
8
|
import type { Port } from '@agoric/network';
|
|
9
9
|
import { IBCChannelID, type IBCConnectionID } from '@agoric/vats';
|
|
10
10
|
import type { LocalIbcAddress, RemoteIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
@@ -161,6 +161,12 @@ export interface IcaAccount {
|
|
|
161
161
|
export type LiquidStakingMethods = {
|
|
162
162
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
163
163
|
};
|
|
164
|
+
export type LocalAccountMethods = {
|
|
165
|
+
/** deposit payment (from zoe, for example) to the account */
|
|
166
|
+
deposit: (payment: Payment<'nat'>) => Promise<void>;
|
|
167
|
+
/** withdraw a Payment from the account */
|
|
168
|
+
withdraw: (amount: Amount<'nat'>) => Promise<Payment<'nat'>>;
|
|
169
|
+
};
|
|
164
170
|
export type IBCMsgTransferOptions = {
|
|
165
171
|
timeoutHeight?: MsgTransfer['timeoutHeight'];
|
|
166
172
|
timeoutTimestamp?: MsgTransfer['timeoutTimestamp'];
|
package/src/cosmos-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,yDAAyD,CAAC;AACtF,OAAO,KAAK,EACV,KAAK,IAAI,eAAe,EACxB,KAAK,EACN,MAAM,qDAAqD,CAAC;AAC7D,OAAO,KAAK,EAAE,KAAK,IAAI,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAC7G,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,yDAAyD,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AE,MAAM,eAAe,CAAC;IACvC,oDAAoD;IACpD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,6DAA6D;IAC7D,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,yBAAyB,CAAC,GAAG,SAAS,eAAe,IAC/D,CAAC,GAAG,SAAS;IACX,UAAU,EAAE,IAAI,CAAC;CAClB,GACG,UAAU,GACV,EAAE,CAAC,GACL,GAAG,SAAS;IACZ,aAAa,EAAE,EAAE,CAAC;CACnB,GACG,qBAAqB,GACrB,EAAE,CAAC"}
|
package/src/cosmos-api.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
Order,
|
|
12
12
|
} from '@agoric/cosmic-proto/ibc/core/channel/v1/channel.js';
|
|
13
13
|
import type { State as IBCConnectionState } from '@agoric/cosmic-proto/ibc/core/connection/v1/connection.js';
|
|
14
|
-
import type { Brand, Purse } from '@agoric/ertp/src/types.js';
|
|
14
|
+
import type { Brand, Purse, Payment, Amount } from '@agoric/ertp/src/types.js';
|
|
15
15
|
import type { Port } from '@agoric/network';
|
|
16
16
|
import { IBCChannelID, type IBCConnectionID } from '@agoric/vats';
|
|
17
17
|
import type {
|
|
@@ -212,6 +212,13 @@ export type LiquidStakingMethods = {
|
|
|
212
212
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
+
export type LocalAccountMethods = {
|
|
216
|
+
/** deposit payment (from zoe, for example) to the account */
|
|
217
|
+
deposit: (payment: Payment<'nat'>) => Promise<void>;
|
|
218
|
+
/** withdraw a Payment from the account */
|
|
219
|
+
withdraw: (amount: Amount<'nat'>) => Promise<Payment<'nat'>>;
|
|
220
|
+
};
|
|
221
|
+
|
|
215
222
|
export type IBCMsgTransferOptions = {
|
|
216
223
|
timeoutHeight?: MsgTransfer['timeoutHeight'];
|
|
217
224
|
timeoutTimestamp?: MsgTransfer['timeoutTimestamp'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendAnywhere.contract.d.ts","sourceRoot":"","sources":["sendAnywhere.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendAnywhere.contract.d.ts","sourceRoot":"","sources":["sendAnywhere.contract.js"],"names":[],"mappings":"AAmFA,kEAKE;AASK,2BANI,GAAG,eACH,mBAAmB,GAAG;IAChC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;;;QAsDZ;;;WAGG;4BAFQ,eAAe,kBACf,iBAAiB;;GAqBjC;kCAlJY;IACZ,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;6BAlBsB,kBAAkB;qCAKS,eAAe;uCAAf,eAAe;gCAHvC,gCAAgC;4BAEpC,aAAa;0CAEC,eAAe;kCALvB,cAAc;6BAEnB,cAAc"}
|
|
@@ -68,6 +68,8 @@ const sendItFn = async (
|
|
|
68
68
|
const { chainId } = info;
|
|
69
69
|
assert(typeof chainId === 'string', 'bad chainId');
|
|
70
70
|
const { [kw]: pmtP } = await withdrawFromSeat(zcf, seat, give);
|
|
71
|
+
// #9212 types for chain account helpers
|
|
72
|
+
// @ts-expect-error LCA should have .deposit() method
|
|
71
73
|
await E.when(pmtP, pmt => contractState.account?.deposit(pmt));
|
|
72
74
|
await contractState.account?.transfer(
|
|
73
75
|
{ denom, value: amt.value },
|
|
@@ -34,7 +34,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
34
34
|
};
|
|
35
35
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
36
36
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
37
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
37
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
38
38
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
|
|
39
39
|
executeTx(messages: {
|
|
40
40
|
'@type': string;
|
|
@@ -59,7 +59,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
59
59
|
};
|
|
60
60
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
61
61
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
62
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
62
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
63
63
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
|
|
64
64
|
executeTx(messages: {
|
|
65
65
|
'@type': string;
|
|
@@ -99,7 +99,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
99
99
|
};
|
|
100
100
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
101
101
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
102
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
102
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
103
103
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
|
|
104
104
|
executeTx(messages: {
|
|
105
105
|
'@type': string;
|
|
@@ -47,7 +47,6 @@ export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
|
|
|
47
47
|
};
|
|
48
48
|
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
49
49
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<undefined>;
|
|
50
|
-
deposit(payment: any): void;
|
|
51
50
|
getBalances(): import("@agoric/vow").Vow<never>;
|
|
52
51
|
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<undefined>;
|
|
53
52
|
withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): import("@agoric/vow").Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stakeIca.contract.d.ts","sourceRoot":"","sources":["stakeIca.contract.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAelC;AACH;;;;;cAAsD;AAsB/C,2BATI,GAAG,CAAC,aAAa,CAAC,eAClB;IACV,aAAiB,EAAE,oBAAoB,CAAC;IACxC,WAAe,EAAE,WAAW,CAAC;IAC7B,UAAc,EAAE,UAAU,CAAC;IAC3B,KAAS,EAAE,YAAY,CAAC;CACrB,WACO,OAAO
|
|
1
|
+
{"version":3,"file":"stakeIca.contract.d.ts","sourceRoot":"","sources":["stakeIca.contract.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAelC;AACH;;;;;cAAsD;AAsB/C,2BATI,GAAG,CAAC,aAAa,CAAC,eAClB;IACV,aAAiB,EAAE,oBAAoB,CAAC;IACxC,WAAe,EAAE,WAAW,CAAC;IAC7B,UAAc,EAAE,UAAU,CAAC;IAC3B,KAAS,EAAE,YAAY,CAAC;CACrB,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFjB;4BAnGY;IACZ,OAAW,EAAE,MAAM,CAAC;IACpB,gBAAoB,EAAE,eAAe,CAAC;IACtC,sBAA0B,EAAE,eAAe,CAAC;IAC5C,SAAa,EAAE,MAAM,CAAC;IACtB,UAAc,EAAE,OAAO,CAAC;CACrB;yBA+FU,OAAO,KAAK;0CA3H4B,aAAa;kCADpC,cAAc;6BAFnB,kBAAkB;qCACV,cAAc"}
|
|
@@ -27,7 +27,6 @@ export const IcaAccountHolderI: import("@endo/patterns").InterfaceGuard<{
|
|
|
27
27
|
send: import("@endo/patterns").MethodGuard;
|
|
28
28
|
transfer: import("@endo/patterns").MethodGuard;
|
|
29
29
|
transferSteps: import("@endo/patterns").MethodGuard;
|
|
30
|
-
deposit: import("@endo/patterns").MethodGuard;
|
|
31
30
|
}>;
|
|
32
31
|
export function prepareCosmosOrchestrationAccountKit(zone: Zone, makeRecorderKit: MakeRecorderKit, { watch, asVow }: VowTools, zcf: ZCF): (chainAddress: ChainAddress, bondDenom: string, io: {
|
|
33
32
|
account: IcaAccount;
|
|
@@ -144,7 +143,6 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, makeRecorderKit
|
|
|
144
143
|
* @param {AmountArg} amount
|
|
145
144
|
*/
|
|
146
145
|
delegate(validator: CosmosValidatorAddress, amount: AmountArg): Vow<undefined>;
|
|
147
|
-
deposit(payment: any): void;
|
|
148
146
|
getBalances(): Vow<never>;
|
|
149
147
|
/**
|
|
150
148
|
* _Assumes users has already sent funds to their ICA, until #9193
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"AAoDA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,mCAAmC;AACnC;;;;;;;;;;;;;;GAmBG;AAgBI,2DALI,IAAI,mBACJ,eAAe,oBACf,QAAQ,OACR,GAAG;aAwDC,UAAU;iBACV,OAAO,WAAW,CAAC;mBACnB,aAAa,GAAG,SAAS;WACzB,OAAO,YAAY,CAAC;;;QAe3B,wDAAwD;;;QAWxD;;;WAGG;6BAFQ,SAAS,GACP,IAAI;;;QAiBjB;;WAEG;8BADQ,SAAS,aAAa,CAAC,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IACjE,OAAW,EAAE,UAAU,CAAC;IACxB,YAAgB,EAAE,YAAY,CAAC;IAC/B,aAAiB,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7C,SAAa,EAAE,MAAM,CAAC;IACtB,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;CAC7B;4CAgbS,UAAU,CACtB,UAAc,CAAC,OAAO,oCAAoC,CAAC,CACxD;yCA4BU,6BAA6B,CAAC,QAAQ,CAAC;0BApe9B,cAAc;qCANU,6CAA6C;8BAK5D,aAAa;kCANqH,aAAa;gCAAb,aAAa;4BAItJ,kBAAkB;mCAJuH,aAAa;kCAKhJ,cAAc;+BALqH,aAAa;0BAExJ,kDAAkD;mCAMzC,+CAA+C;8BACpD,sBAAsB;iCATiH,aAAa;yBAM/I,aAAa;4CANqH,aAAa;gCAGlJ,wDAAwD;8BAH6E,aAAa;iCAChI,6CAA6C"}
|
|
@@ -32,7 +32,6 @@ import {
|
|
|
32
32
|
} from '../typeGuards.js';
|
|
33
33
|
import { maxClockSkew, tryDecodeResponse } from '../utils/cosmos.js';
|
|
34
34
|
import { orchestrationAccountMethods } from '../utils/orchestrationAccount.js';
|
|
35
|
-
import { dateInSeconds } from '../utils/time.js';
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
37
|
* @import {AmountArg, IcaAccount, ChainAddress, CosmosValidatorAddress, ICQConnection, StakingAccountActions, DenomAmount, OrchestrationAccountI, DenomArg} from '../types.js';
|
|
@@ -230,9 +229,8 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
230
229
|
const { completionTime } = response;
|
|
231
230
|
completionTime || Fail`No completion time result ${result}`;
|
|
232
231
|
return watch(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
),
|
|
232
|
+
// ignore nanoseconds and just use seconds from Timestamp
|
|
233
|
+
E(this.state.timer).wakeAt(completionTime.seconds + maxClockSkew),
|
|
236
234
|
);
|
|
237
235
|
},
|
|
238
236
|
},
|
|
@@ -367,12 +365,6 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
367
365
|
return watch(results, this.facets.returnVoidWatcher);
|
|
368
366
|
});
|
|
369
367
|
},
|
|
370
|
-
deposit(payment) {
|
|
371
|
-
trace('deposit', payment);
|
|
372
|
-
console.error(
|
|
373
|
-
'FIXME deposit noop until https://github.com/Agoric/agoric-sdk/issues/9193',
|
|
374
|
-
);
|
|
375
|
-
},
|
|
376
368
|
getBalances() {
|
|
377
369
|
// TODO https://github.com/Agoric/agoric-sdk/issues/9610
|
|
378
370
|
return asVow(() => Fail`not yet implemented`);
|
|
@@ -41,7 +41,7 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
|
|
|
41
41
|
};
|
|
42
42
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<Record<unknown, unknown>>;
|
|
43
43
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<void | import("@agoric/time").TimestampRecord>;
|
|
44
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
44
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): Vow<import("@agoric/ertp/src/types.js").NatAmount | Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
45
45
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): Vow<globalThis.Payment<"nat"> | Vow<globalThis.Payment<"nat">>>;
|
|
46
46
|
executeTx(messages: {
|
|
47
47
|
'@type': string;
|
|
@@ -24,7 +24,7 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, makeRecorderKit:
|
|
|
24
24
|
* >,
|
|
25
25
|
* ]} response
|
|
26
26
|
*/
|
|
27
|
-
onFulfilled(response: [JsonSafe<TypedJson<"/cosmos.staking.v1beta1.MsgUndelegateResponse">>]): Vow<
|
|
27
|
+
onFulfilled(response: [JsonSafe<TypedJson<"/cosmos.staking.v1beta1.MsgUndelegateResponse">>]): Vow<undefined>;
|
|
28
28
|
};
|
|
29
29
|
getChainInfoWatcher: {
|
|
30
30
|
/**
|
|
@@ -118,8 +118,8 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, makeRecorderKit:
|
|
|
118
118
|
* updater will get a special notification that the account is being
|
|
119
119
|
* transferred.
|
|
120
120
|
*/
|
|
121
|
-
/** @type {PromiseToVow<
|
|
122
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
121
|
+
/** @type {PromiseToVow<LocalChainAccount['deposit']>} */
|
|
122
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): Vow<import("@agoric/ertp/src/types.js").NatAmount | Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
123
123
|
/** @type {PromiseToVow<LocalChainAccount['withdraw']>} */
|
|
124
124
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): Vow<globalThis.Payment<"nat"> | Vow<globalThis.Payment<"nat">>>;
|
|
125
125
|
/** @type {PromiseToVow<LocalChainAccount['executeTx']>} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AA0EO,0DAPI,IAAI,mBACJ,eAAe,OACf,GAAG,gBACH,OAAO,YAAY,CAAC,6BACpB,QAAQ,YACR,QAAQ;aA6DJ,iBAAiB;aACjB,YAAY;iBACZ,OAAO,WAAW,CAAC;;;QAY1B;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;QAYxB;;;WAGG;qCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;;QAiBxB;;;;;;WAMG;8BALQ,CACV,SACA,UAAgB,+CAA+C,CAAC,CAC3D,CACF;;;QAcJ;;;WAGG;6DADQ,YAAY;;;QAUvB;;;;;;;;;;WAUG;6DATQ,CACV;YAAM,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAA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|
@@ -13,10 +13,11 @@ import {
|
|
|
13
13
|
DenomAmountShape,
|
|
14
14
|
DenomShape,
|
|
15
15
|
IBCTransferOptionsShape,
|
|
16
|
+
TimestampProtoShape,
|
|
16
17
|
} from '../typeGuards.js';
|
|
17
18
|
import { maxClockSkew } from '../utils/cosmos.js';
|
|
18
19
|
import { orchestrationAccountMethods } from '../utils/orchestrationAccount.js';
|
|
19
|
-
import {
|
|
20
|
+
import { makeTimestampHelper } from '../utils/time.js';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* @import {LocalChainAccount} from '@agoric/vats/src/localchain.js';
|
|
@@ -53,6 +54,7 @@ const HolderI = M.interface('holder', {
|
|
|
53
54
|
getPublicTopics: M.call().returns(TopicsRecordShape),
|
|
54
55
|
delegate: M.call(M.string(), AmountShape).returns(VowShape),
|
|
55
56
|
undelegate: M.call(M.string(), AmountShape).returns(VowShape),
|
|
57
|
+
deposit: M.call(PaymentShape).returns(VowShape),
|
|
56
58
|
withdraw: M.call(AmountShape).returns(Vow$(PaymentShape)),
|
|
57
59
|
executeTx: M.call(M.arrayOf(M.record())).returns(Vow$(M.record())),
|
|
58
60
|
});
|
|
@@ -86,7 +88,9 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
86
88
|
{
|
|
87
89
|
holder: HolderI,
|
|
88
90
|
undelegateWatcher: M.interface('undelegateWatcher', {
|
|
89
|
-
onFulfilled: M.call([
|
|
91
|
+
onFulfilled: M.call([
|
|
92
|
+
M.splitRecord({ completionTime: TimestampProtoShape }),
|
|
93
|
+
])
|
|
90
94
|
.optional(M.arrayOf(M.undefined())) // empty context
|
|
91
95
|
.returns(VowShape),
|
|
92
96
|
}),
|
|
@@ -185,9 +189,10 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
185
189
|
const { completionTime } = response[0];
|
|
186
190
|
return watch(
|
|
187
191
|
E(timerService).wakeAt(
|
|
188
|
-
//
|
|
189
|
-
|
|
192
|
+
// ignore nanoseconds and just use seconds from Timestamp
|
|
193
|
+
BigInt(completionTime.seconds) + maxClockSkew,
|
|
190
194
|
),
|
|
195
|
+
this.facets.returnVoidWatcher,
|
|
191
196
|
);
|
|
192
197
|
},
|
|
193
198
|
},
|
|
@@ -367,7 +372,7 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
367
372
|
* updater will get a special notification that the account is being
|
|
368
373
|
* transferred.
|
|
369
374
|
*/
|
|
370
|
-
/** @type {PromiseToVow<
|
|
375
|
+
/** @type {PromiseToVow<LocalChainAccount['deposit']>} */
|
|
371
376
|
deposit(payment) {
|
|
372
377
|
return watch(
|
|
373
378
|
E(this.state.account).deposit(payment),
|
|
@@ -58,7 +58,6 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
58
58
|
};
|
|
59
59
|
getAddress(): ChainAddress;
|
|
60
60
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
61
|
-
deposit(payment: any): void;
|
|
62
61
|
getBalances(): Vow<never>;
|
|
63
62
|
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
64
63
|
withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
@@ -106,7 +105,6 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
106
105
|
};
|
|
107
106
|
getAddress(): ChainAddress;
|
|
108
107
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
109
|
-
deposit(payment: any): void;
|
|
110
108
|
getBalances(): Vow<never>;
|
|
111
109
|
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
112
110
|
withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA0IO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;QAzD1B,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAwBhE;;;WAGG;6BAFQ,UAAU,gBACV,KAAK
|
|
1
|
+
{"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA0IO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;QAzD1B,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAwBhE;;;WAGG;6BAFQ,UAAU,gBACV,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUhB;;;WAGG;kCAFQ,YAAY,6BACZ;YAAE,YAAY,EAAE,KAAK,CAAC;YAAC,OAAO,EAAE,UAAU,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwB9D;sCApHY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IAChD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;oCA+GU,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAvIlC,mBAAmB;uCAM2F,aAAa;yBAHlH,aAAa;+BAGwF,aAAa;0CAAb,aAAa;kCAAb,aAAa;gCAAb,aAAa;2BAAb,aAAa;kCAAb,aAAa;uDAD9F,mCAAmC;0CADhD,eAAe;4BAF7B,kBAAkB;kCADZ,cAAc;8BAEb,aAAa"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* - must not have chain-specific types without runtime narrowing by chain id
|
|
4
4
|
* - should remain relatively stable.
|
|
5
5
|
*/
|
|
6
|
-
import type { Amount, Brand, NatAmount
|
|
6
|
+
import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
|
|
7
7
|
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
|
|
8
8
|
import type { Timestamp } from '@agoric/time';
|
|
9
9
|
import type { ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, IBCMsgTransferOptions, KnownChains } from './types.js';
|
|
@@ -124,11 +124,6 @@ export interface OrchestrationAccountI {
|
|
|
124
124
|
* @returns void
|
|
125
125
|
*/
|
|
126
126
|
transferSteps: (amount: AmountArg, msg: TransferMsg) => Promise<void>;
|
|
127
|
-
/**
|
|
128
|
-
* deposit payment from zoe to the account. For remote accounts,
|
|
129
|
-
* an IBC Transfer will be executed to transfer funds there.
|
|
130
|
-
*/
|
|
131
|
-
deposit: (payment: Payment<'nat'>) => Promise<void>;
|
|
132
127
|
}
|
|
133
128
|
/**
|
|
134
129
|
* Internal structure for TransferMsgs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,SAAS,EAEV,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,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EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,YAAY,CAAA;CAAE,CAAC;AAC3E,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/src/orchestration-api.ts
CHANGED
|
@@ -172,11 +172,6 @@ export interface OrchestrationAccountI {
|
|
|
172
172
|
* @returns void
|
|
173
173
|
*/
|
|
174
174
|
transferSteps: (amount: AmountArg, msg: TransferMsg) => Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* deposit payment from zoe to the account. For remote accounts,
|
|
177
|
-
* an IBC Transfer will be executed to transfer funds there.
|
|
178
|
-
*/
|
|
179
|
-
deposit: (payment: Payment<'nat'>) => Promise<void>;
|
|
180
175
|
}
|
|
181
176
|
|
|
182
177
|
/**
|
|
@@ -36,7 +36,6 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
36
36
|
};
|
|
37
37
|
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
38
38
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<undefined>;
|
|
39
|
-
deposit(payment: any): void;
|
|
40
39
|
getBalances(): import("@agoric/vow").Vow<never>;
|
|
41
40
|
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<undefined>;
|
|
42
41
|
withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): import("@agoric/vow").Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,CAC9B
|
|
1
|
+
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA0D,CACjD,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAoDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCAjG4C,+BAA+B"}
|
|
@@ -34,7 +34,7 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
34
34
|
};
|
|
35
35
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
36
36
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
37
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
37
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
38
38
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
|
|
39
39
|
executeTx(messages: {
|
|
40
40
|
'@type': string;
|
|
@@ -59,7 +59,7 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
59
59
|
};
|
|
60
60
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
61
61
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
62
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
62
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
63
63
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
|
|
64
64
|
executeTx(messages: {
|
|
65
65
|
'@type': string;
|
|
@@ -96,7 +96,7 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
96
96
|
};
|
|
97
97
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
98
98
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
99
|
-
deposit(payment: globalThis.Payment<"nat"
|
|
99
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount | import("@agoric/vow").Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
100
100
|
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat"> | import("@agoric/vow").Vow<globalThis.Payment<"nat">>>;
|
|
101
101
|
executeTx(messages: {
|
|
102
102
|
'@type': string;
|
|
@@ -36,7 +36,6 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
|
|
|
36
36
|
};
|
|
37
37
|
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
38
38
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<undefined>;
|
|
39
|
-
deposit(payment: any): void;
|
|
40
39
|
getBalances(): import("@agoric/vow").Vow<never>;
|
|
41
40
|
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<undefined>;
|
|
42
41
|
withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): import("@agoric/vow").Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,CAC9B
|
|
1
|
+
{"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA0D,CACjD,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAqDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN"}
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -52,4 +52,8 @@ export const ChainFacadeI: import("@endo/patterns").InterfaceGuard<{
|
|
|
52
52
|
getChainInfo: import("@endo/patterns").MethodGuard;
|
|
53
53
|
makeAccount: import("@endo/patterns").MethodGuard;
|
|
54
54
|
}>;
|
|
55
|
+
export namespace TimestampProtoShape {
|
|
56
|
+
let seconds: import("@endo/patterns").Matcher;
|
|
57
|
+
let nanos: import("@endo/patterns").Matcher;
|
|
58
|
+
}
|
|
55
59
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.js
CHANGED
|
@@ -102,3 +102,9 @@ export const ChainFacadeI = M.interface('ChainFacade', {
|
|
|
102
102
|
getChainInfo: M.call().returns(VowShape),
|
|
103
103
|
makeAccount: M.call().returns(VowShape),
|
|
104
104
|
});
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* for google/protobuf/timestamp.proto, not to be confused with TimestampShape
|
|
108
|
+
* from `@agoric/time`
|
|
109
|
+
*/
|
|
110
|
+
export const TimestampProtoShape = { seconds: M.nat(), nanos: M.number() };
|
|
@@ -5,6 +5,5 @@ export namespace orchestrationAccountMethods {
|
|
|
5
5
|
let send: import("@endo/patterns").MethodGuard;
|
|
6
6
|
let transfer: import("@endo/patterns").MethodGuard;
|
|
7
7
|
let transferSteps: import("@endo/patterns").MethodGuard;
|
|
8
|
-
let deposit: import("@endo/patterns").MethodGuard;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=orchestrationAccount.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { M } from '@endo/patterns';
|
|
2
|
-
import { PaymentShape } from '@agoric/ertp';
|
|
3
2
|
import { Shape as NetworkShape } from '@agoric/network';
|
|
4
3
|
import { VowShape } from '@agoric/vow';
|
|
5
4
|
import { AmountArgShape, ChainAddressShape, CoinShape } from '../typeGuards.js';
|
|
@@ -18,5 +17,4 @@ export const orchestrationAccountMethods = {
|
|
|
18
17
|
.optional(M.record())
|
|
19
18
|
.returns(VowShape),
|
|
20
19
|
transferSteps: M.call(AmountArgShape, M.any()).returns(VowShape),
|
|
21
|
-
deposit: M.call(PaymentShape).returns(VowShape),
|
|
22
20
|
};
|
package/src/utils/time.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ export function makeTimestampHelper(timer: Remote<TimerService>): {
|
|
|
22
22
|
* @import {Remote} from '@agoric/internal';
|
|
23
23
|
*/
|
|
24
24
|
export const SECONDS_PER_MINUTE: 60n;
|
|
25
|
+
export const MILLISECONDS_PER_SECOND: 1000n;
|
|
25
26
|
export const NANOSECONDS_PER_SECOND: 1000000000n;
|
|
26
|
-
export function dateInSeconds(date: Date): bigint;
|
|
27
27
|
export type TimestampHelper = Awaited<ReturnType<typeof makeTimestampHelper>>;
|
|
28
28
|
import type { TimerService } from '@agoric/time';
|
|
29
29
|
import type { Remote } from '@agoric/internal';
|
package/src/utils/time.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,2CAFW,OAAO,YAAY,CAAC;IAY3B;;;;;;;;;;OAUG;0EAFU,OAAO,CAAC,MAAM,CAAC;EAiB/B;AAjDD;;;GAGG;AAEH,qCAAsC;AACtC,4CAA6C;AAC7C,iDAAqD;8BA4CvC,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;kCAlDE,cAAc;4BACpD,kBAAkB;wCADoB,cAAc"}
|
package/src/utils/time.js
CHANGED
|
@@ -7,6 +7,7 @@ import { TimeMath } from '@agoric/time';
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export const SECONDS_PER_MINUTE = 60n;
|
|
10
|
+
export const MILLISECONDS_PER_SECOND = 1000n;
|
|
10
11
|
export const NANOSECONDS_PER_SECOND = 1_000_000_000n;
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -52,12 +53,3 @@ export function makeTimestampHelper(timer) {
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/** @typedef {Awaited<ReturnType<typeof makeTimestampHelper>>} TimestampHelper */
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Convert a Date from a Cosmos message, which has millisecond precision, to a
|
|
58
|
-
* BigInt for number of seconds since epoch, for use in a timer.
|
|
59
|
-
*
|
|
60
|
-
* @param {Date} date
|
|
61
|
-
* @returns {bigint}
|
|
62
|
-
*/
|
|
63
|
-
export const dateInSeconds = date => BigInt(Math.floor(date.getTime() / 1000));
|