Private requests
Private requests go through WalletAccountV6 (see Connect).
Reading the balance
wallet_strk20Balances asks the user to share the private balance of the tokens named. The grant
lasts an hour, or until valid_until (a Unix time, at most a day ahead). While it lasts, Outis
answers without asking.
await wallet.request({
type: "wallet_strk20Balances",
params: { tokens: [STRK] },
});Private actions
A request lists its actions:
transfer: a private payment. Its amount can be"OPEN", for the invoked contract to fill.withdraw: to a public address.invoke: one contract per request, run after everything else. This is how private swaps work. Its calldata can name${poolAddress}and${openNoteIds[0]}.
await wallet.request({
type: "wallet_strk20InvokeTransaction",
params: {
actions: [{ type: "transfer", token: STRK, recipient, amount }],
},
});wallet_strk20InvokeTransaction: Outis proves the actions, and its relayer sends them, paid from the private balance.wallet_strk20PrepareInvoke: Outis proves them and returns theapply_actionscall with its proof, for the dApp to send. Withsimulate, it runs them without a proof instead.
A request that can't work is refused before the user is asked: see Errors.
Not yet
Deposits and shadow accounts are refused.