-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc97f7a
commit 6f596fb
Showing
13 changed files
with
221 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import BigNumber from "bignumber.js"; | ||
|
||
import { Account, ShieldingTransferMsgValue } from "@namada/types"; | ||
import { EncodedTxData } from "lib/query"; | ||
import { ChainSettings } from "types"; | ||
import { WebWorkerMessage } from "./utils"; | ||
|
||
type InitPayload = { | ||
rpcUrl: string; | ||
token: string; | ||
}; | ||
|
||
type ShieldPayload = { | ||
account: Account; | ||
gasConfig: { | ||
gasLimit: BigNumber; | ||
gasPrice: BigNumber; | ||
}; | ||
shieldingProps: ShieldingTransferMsgValue[]; | ||
chain: ChainSettings; | ||
indexerUrl: string; | ||
}; | ||
|
||
type BroadcastPayload = { | ||
encodedTx: EncodedTxData<ShieldingTransferMsgValue>; | ||
signedTxs: Uint8Array[]; | ||
}; | ||
|
||
export type Init = WebWorkerMessage<"init", InitPayload>; | ||
export type InitDone = WebWorkerMessage<"init-done", null>; | ||
|
||
export type Shield = WebWorkerMessage<"shield", ShieldPayload>; | ||
export type ShieldDone = WebWorkerMessage< | ||
"shield-done", | ||
EncodedTxData<ShieldingTransferMsgValue> | ||
>; | ||
|
||
export type Broadcast = WebWorkerMessage<"broadcast", BroadcastPayload>; | ||
export type BroadcastDone = WebWorkerMessage<"broadcast-done", null>; | ||
|
||
export type ShieldMessageIn = Shield | Broadcast | Init; | ||
export type ShieldMessageOut = ShieldDone | BroadcastDone | InitDone; |
Oops, something went wrong.