File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
packages/cosmic-swingset/src Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -4,35 +4,41 @@ import type {
4
4
CoreEvalSDKType ,
5
5
} from '@agoric/cosmic-proto/agoric/swingset/swingset.js' ;
6
6
7
- interface BlockInfo {
8
- blockHeight : number ;
9
- blockTime : number ;
7
+ // TODO move `walletFlags.js` from @agoric/vats to @agoric/cosmic-proto
8
+ type PowerFlag = 'SMART_WALLET' | 'REMOTE_WALLET' ;
9
+
10
+ // NB: keep these manually synced until we build these types out of the Golang
11
+ // structs or use some other shared type truth
12
+ // https://github.com/Agoric/agoric-sdk/issues/8545
13
+
14
+ interface ActionContext < T extends Uppercase < string > > {
15
+ type : T ;
16
+ blockHeight : string ;
17
+ blockTime : string ;
10
18
}
11
19
12
20
/**
13
21
* @see coreEvalAction in proposal.go
14
22
*/
15
- export type CoreEvalAction = BlockInfo & {
16
- type : 'CORE_EVAL' ;
23
+ export type CoreEvalAction = ActionContext < 'CORE_EVAL' > & {
17
24
evals : CoreEvalSDKType [ ] ;
18
25
} ;
19
26
20
27
/**
21
28
* @see provisionAction in msg_server.go
22
29
*/
23
- export type PleaseProvisionAction = {
24
- type : 'PLEASE_PROVISION' ;
30
+ export type PleaseProvisionAction = ActionContext < 'PLEASE_PROVISION' > & {
25
31
address : string ;
26
32
nickname : string ;
27
- powerFlags : PowerFlags . SMART_WALLET ;
33
+ powerFlags : PowerFlag [ ] ;
28
34
submitter : string ;
35
+ autoProvision : boolean ;
29
36
} ;
30
37
31
38
/**
32
39
* @see VbankBalanceUpdate in vbank.go
33
40
*/
34
- export type VbankBalanceUpdateAction = {
35
- type : 'VBANK_BALANCE_UPDATE' ;
41
+ export type VbankBalanceUpdateAction = ActionContext < 'VBANK_BALANCE_UPDATE' > & {
36
42
nonce : string ;
37
43
updated : Array < { address : string ; denom : string ; amount : string } > ;
38
44
} ;
You can’t perform that action at this time.
0 commit comments