Wallet methods (LWS-0)
Every method the Logos Kit wallet answers, generated from the protocol schema.
Protocol version 0.1.0. Reads are module calls on
logos_kit_wallet (logos.callModuleAsync); user-facing steps open the wallet
through a Basecamp intent. The QML and TypeScript SDKs wrap all of them: you
rarely call these by name.
lez_connect
LWS-0 connect (silent restore only; use the lez.wallet.connect intent).
User-facing. Open it with the lez.wallet.connect intent; the wallet shows its own sheet.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chains | string[] | yes | |
accountKinds | "public" | "private"[] | no | |
capabilities | "accounts" | "read_public" | "read_private" | "propose_tx" | "sign_message" | "request_proof"[] | no | |
silent | boolean | no | |
signIn | object | no |
Result
object: sessionId, origin, chains, accounts, expiry, capabilities, signIn
JSON Schema
{
"params": {
"type": "object",
"required": [
"chains"
],
"properties": {
"chains": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"minItems": 1
},
"accountKinds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
}
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
},
"silent": {
"type": "boolean"
},
"signIn": {
"type": "object",
"required": [
"domain",
"uri",
"nonce",
"issuedAt"
],
"properties": {
"domain": {
"type": "string",
"maxLength": 253
},
"statement": {
"type": "string",
"maxLength": 512
},
"uri": {
"type": "string",
"maxLength": 2048
},
"nonce": {
"type": "string",
"minLength": 8,
"maxLength": 64
},
"issuedAt": {
"type": "string",
"format": "date-time"
},
"expirationTime": {
"type": "string",
"format": "date-time"
},
"notBefore": {
"type": "string",
"format": "date-time"
},
"requestId": {
"type": "string",
"maxLength": 64
}
}
}
}
},
"result": {
"type": "object",
"required": [
"sessionId",
"origin",
"chains",
"accounts",
"capabilities"
],
"properties": {
"sessionId": {
"type": "string",
"minLength": 16,
"maxLength": 128
},
"origin": {
"type": "string"
},
"chains": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
}
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"kind",
"chain",
"capabilities"
],
"properties": {
"address": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"label": {
"type": "string",
"maxLength": 64
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
}
}
}
},
"expiry": {
"type": "string",
"format": "date-time"
},
"capabilities": {
"type": "object",
"required": [
"accountKinds",
"signTransaction",
"batch",
"outcomeVerification",
"signMessage",
"signIn",
"requestFunds"
],
"properties": {
"accountKinds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
}
},
"signTransaction": {
"type": "boolean"
},
"batch": {
"type": "object",
"required": [
"maxInstructions",
"atomic"
],
"properties": {
"maxInstructions": {
"type": "integer",
"minimum": 1,
"maximum": 16
},
"atomic": {
"anyOf": [
{
"type": "string",
"const": "supported"
},
{
"type": "string",
"const": "unsupported"
}
]
}
}
},
"proving": {
"type": "object",
"required": [
"location"
],
"properties": {
"location": {
"anyOf": [
{
"type": "string",
"const": "local"
},
{
"type": "string",
"const": "paired"
},
{
"type": "string",
"const": "user-owned"
},
{
"type": "string",
"const": "tee"
}
]
},
"typicalSeconds": {
"type": "integer",
"minimum": 0
}
}
},
"outcomeVerification": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "own-account-invariant"
},
{
"type": "string",
"const": "program-event"
},
{
"type": "string",
"const": "node"
}
]
}
},
"signMessage": {
"type": "boolean"
},
"signIn": {
"type": "boolean"
},
"requestFunds": {
"type": "boolean"
}
}
},
"signIn": {
"type": "object",
"required": [
"account",
"signedMessage",
"signature"
],
"properties": {
"account": {
"type": "object",
"required": [
"address",
"kind",
"chain",
"capabilities"
],
"properties": {
"address": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"label": {
"type": "string",
"maxLength": 64
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
}
}
},
"signedMessage": {
"type": "string"
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
}
}
}
}
}
}lez_disconnect
LWS-0: drop this app's grants.
Read. A module call; no prompt.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
sessionId | string | yes |
Result
null
JSON Schema
{
"params": {
"type": "object",
"required": [
"sessionId"
],
"properties": {
"sessionId": {
"type": "string"
}
}
},
"result": {
"type": "null"
}
}lez_getSession
LWS-0: this app's session, or null.
Read. A module call; no prompt.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
sessionId | string | no |
Result
object \| null
JSON Schema
{
"params": {
"type": "object",
"properties": {
"sessionId": {
"type": "string"
}
}
},
"result": {
"anyOf": [
{
"type": "object",
"required": [
"sessionId",
"origin",
"chains",
"accounts",
"capabilities"
],
"properties": {
"sessionId": {
"type": "string",
"minLength": 16,
"maxLength": 128
},
"origin": {
"type": "string"
},
"chains": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
}
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"kind",
"chain",
"capabilities"
],
"properties": {
"address": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"label": {
"type": "string",
"maxLength": 64
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
}
}
}
},
"expiry": {
"type": "string",
"format": "date-time"
},
"capabilities": {
"type": "object",
"required": [
"accountKinds",
"signTransaction",
"batch",
"outcomeVerification",
"signMessage",
"signIn",
"requestFunds"
],
"properties": {
"accountKinds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
}
},
"signTransaction": {
"type": "boolean"
},
"batch": {
"type": "object",
"required": [
"maxInstructions",
"atomic"
],
"properties": {
"maxInstructions": {
"type": "integer",
"minimum": 1,
"maximum": 16
},
"atomic": {
"anyOf": [
{
"type": "string",
"const": "supported"
},
{
"type": "string",
"const": "unsupported"
}
]
}
}
},
"proving": {
"type": "object",
"required": [
"location"
],
"properties": {
"location": {
"anyOf": [
{
"type": "string",
"const": "local"
},
{
"type": "string",
"const": "paired"
},
{
"type": "string",
"const": "user-owned"
},
{
"type": "string",
"const": "tee"
}
]
},
"typicalSeconds": {
"type": "integer",
"minimum": 0
}
}
},
"outcomeVerification": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "own-account-invariant"
},
{
"type": "string",
"const": "program-event"
},
{
"type": "string",
"const": "node"
}
]
}
},
"signMessage": {
"type": "boolean"
},
"signIn": {
"type": "boolean"
},
"requestFunds": {
"type": "boolean"
}
}
},
"signIn": {
"type": "object",
"required": [
"account",
"signedMessage",
"signature"
],
"properties": {
"account": {
"type": "object",
"required": [
"address",
"kind",
"chain",
"capabilities"
],
"properties": {
"address": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"label": {
"type": "string",
"maxLength": 64
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
}
}
},
"signedMessage": {
"type": "string"
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
}
}
}
}
},
{
"type": "null"
}
]
}
}lez_getAccounts
LWS-0: accounts shared with this app.
Read. A module call; no prompt.
Params
No parameters.
Result
object[]
JSON Schema
{
"params": {
"type": "object",
"properties": {}
},
"result": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"kind",
"chain",
"capabilities"
],
"properties": {
"address": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"label": {
"type": "string",
"maxLength": 64
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
}
}
}
}
}lez_chainId
LWS-0: the network the wallet is on ({chain}).
Read. A module call; no prompt.
Behaviour
- Answers any caller, with or without a session: the network is public
metadata, like
eth_chainId. It never reveals accounts or balances. - The value changes when the user switches networks in the wallet. The QML SDK
checks it on start, when your view is shown, and every 5 s while visible,
and rebuilds
kit.apiwhen it changes (setfollowWallet: falseto pin a network).
Params
No parameters.
Result
object: chain
JSON Schema
{
"params": {
"type": "object",
"properties": {}
},
"result": {
"type": "object",
"required": [
"chain"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
}
}
}
}lez_getCapabilities
LWS-0: what this wallet supports.
Read. A module call; no prompt.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | no | CAIP-2 chain id, e.g. "lez:testnet" |
Result
object: accountKinds, signTransaction, batch, proving, outcomeVerification, signMessage, signIn, requestFunds
JSON Schema
{
"params": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
}
}
},
"result": {
"type": "object",
"required": [
"accountKinds",
"signTransaction",
"batch",
"outcomeVerification",
"signMessage",
"signIn",
"requestFunds"
],
"properties": {
"accountKinds": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
}
},
"signTransaction": {
"type": "boolean"
},
"batch": {
"type": "object",
"required": [
"maxInstructions",
"atomic"
],
"properties": {
"maxInstructions": {
"type": "integer",
"minimum": 1,
"maximum": 16
},
"atomic": {
"anyOf": [
{
"type": "string",
"const": "supported"
},
{
"type": "string",
"const": "unsupported"
}
]
}
}
},
"proving": {
"type": "object",
"required": [
"location"
],
"properties": {
"location": {
"anyOf": [
{
"type": "string",
"const": "local"
},
{
"type": "string",
"const": "paired"
},
{
"type": "string",
"const": "user-owned"
},
{
"type": "string",
"const": "tee"
}
]
},
"typicalSeconds": {
"type": "integer",
"minimum": 0
}
}
},
"outcomeVerification": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "own-account-invariant"
},
{
"type": "string",
"const": "program-event"
},
{
"type": "string",
"const": "node"
}
]
}
},
"signMessage": {
"type": "boolean"
},
"signIn": {
"type": "boolean"
},
"requestFunds": {
"type": "boolean"
}
}
}
}lez_getBalance
LWS-0: balance of a shared account.
Read. A module call; no prompt.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | yes | CAIP-2 chain id, e.g. "lez:testnet" |
account | string | string | yes | |
asset | string | no | Base58-encoded 32-byte LEZ account id |
Result
object: asset, amount, synced, asOfBlock
JSON Schema
{
"params": {
"type": "object",
"required": [
"chain",
"account"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"asset": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
}
}
},
"result": {
"type": "object",
"required": [
"asset",
"amount",
"synced"
],
"properties": {
"asset": {
"anyOf": [
{
"type": "string",
"const": "native"
},
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
}
]
},
"amount": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,38})$",
"description": "u128 as a decimal string. The pattern allows up to 39 digits; values above 2^128-1 are rejected by the codec and wallet with -32602."
},
"synced": {
"type": "boolean"
},
"asOfBlock": {
"type": "string",
"pattern": "^[0-9]+$"
}
}
}
}lez_readAccount
LWS-0: a public account's data for one program (chain state).
Read. A module call; no prompt.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | yes | CAIP-2 chain id, e.g. "lez:testnet" |
account | string | yes | Base58-encoded 32-byte LEZ account id |
program | string | yes | Base58-encoded 32-byte LEZ account id |
Result
object: nonce, data
JSON Schema
{
"params": {
"type": "object",
"required": [
"chain",
"account",
"program"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"account": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
"program": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
}
}
},
"result": {
"type": "object",
"required": [
"nonce",
"data"
],
"properties": {
"nonce": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,38})$",
"description": "u128 as a decimal string. The pattern allows up to 39 digits; values above 2^128-1 are rejected by the codec and wallet with -32602."
},
"data": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
}
}
}
}lez_openExplorer
LWS-0: open the zone's explorer at a transaction or account (the wallet builds the URL).
Read. A module call; no prompt.
Behaviour
- Opens the page in the user's browser (an OS side effect), because the
Basecamp QML sandbox can't open links itself. The result's
urlis the page it opened. - The URL is built by the wallet from a fixed base. Only
lez:testnethas an explorer (https://explorer.testnet.lez.logos.co); other networks answer5700. Achainother than the wallet's current one answers4902. - Pass exactly one of
txHash(32 bytes of hex, optional0x) oraccount(a valid account id); anything else isInvalidParams. - Rate-limited: at most one page per second across all apps (
6107otherwise). - Only apps with a connected session can call it.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | yes | CAIP-2 chain id, e.g. "lez:testnet" |
txHash | string | no | |
account | string | no | Base58-encoded 32-byte LEZ account id |
Result
object: url
JSON Schema
{
"params": {
"type": "object",
"required": [
"chain"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"txHash": {
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"account": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
}
}
},
"result": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}lez_signAndSendTransaction
LWS-0: propose a transaction for the user's approval; answers a handle.
User-facing. Open it with the lez.transaction.send intent; the wallet shows its own sheet.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | yes | CAIP-2 chain id, e.g. "lez:testnet" |
account | string | string | yes | |
id | string | no | |
instructions | object[] | yes | |
atomicRequired | boolean | no |
Result
object: handle, txHash
JSON Schema
{
"params": {
"type": "object",
"required": [
"chain",
"account",
"instructions"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"instructions": {
"type": "array",
"items": {
"type": "object",
"required": [
"program",
"accounts",
"data"
],
"properties": {
"program": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
"accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"account",
"writable",
"signer"
],
"properties": {
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"writable": {
"type": "boolean"
},
"signer": {
"type": "boolean"
}
}
},
"maxItems": 64
},
"data": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"display": {
"type": "object",
"properties": {
"method": {
"type": "string",
"maxLength": 64
},
"args": {
"type": "object",
"patternProperties": {
"^.*$": {}
}
}
}
}
}
},
"minItems": 1,
"maxItems": 16
},
"atomicRequired": {
"type": "boolean"
}
}
},
"result": {
"type": "object",
"required": [
"handle"
],
"properties": {
"handle": {
"type": "string",
"minLength": 16,
"maxLength": 128
},
"txHash": {
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}lez_getTransactionStatus
LWS-0: status of this app's request.
Read. A module call; no prompt.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
handle | string | yes |
Result
object: handle, chain, txHash, lifecycle, outcome, outcomeSource, block, expectedEffects, observedEffects, fee, proving, error
JSON Schema
{
"params": {
"type": "object",
"required": [
"handle"
],
"properties": {
"handle": {
"type": "string"
}
}
},
"result": {
"type": "object",
"required": [
"handle",
"chain",
"lifecycle",
"outcome",
"outcomeSource"
],
"properties": {
"handle": {
"type": "string"
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"txHash": {
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"lifecycle": {
"anyOf": [
{
"type": "string",
"const": "awaiting_approval"
},
{
"type": "string",
"const": "building"
},
{
"type": "string",
"const": "proving"
},
{
"type": "string",
"const": "signing"
},
{
"type": "string",
"const": "submitted"
},
{
"type": "string",
"const": "included"
},
{
"type": "string",
"const": "finalized"
},
{
"type": "string",
"const": "rejected"
},
{
"type": "string",
"const": "dropped"
},
{
"type": "string",
"const": "expired"
}
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"const": "success"
},
{
"type": "string",
"const": "failure"
},
{
"type": "string",
"const": "unknown"
}
]
},
"outcomeSource": {
"anyOf": [
{
"type": "string",
"const": "own-account-invariant"
},
{
"type": "string",
"const": "program-event"
},
{
"type": "string",
"const": "node"
},
{
"type": "string",
"const": "none"
}
]
},
"block": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
},
"expectedEffects": {
"type": "array",
"items": {
"type": "object",
"required": [
"account",
"field"
],
"properties": {
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"field": {
"anyOf": [
{
"type": "string",
"const": "balance"
},
{
"type": "string",
"const": "token_balance"
},
{
"type": "string",
"const": "data"
},
{
"type": "string",
"const": "authority"
},
{
"type": "string",
"const": "nonce"
}
]
},
"asset": {
"type": "string"
},
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"observedEffects": {
"type": "array",
"items": {
"type": "object",
"required": [
"account",
"field"
],
"properties": {
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"field": {
"anyOf": [
{
"type": "string",
"const": "balance"
},
{
"type": "string",
"const": "token_balance"
},
{
"type": "string",
"const": "data"
},
{
"type": "string",
"const": "authority"
},
{
"type": "string",
"const": "nonce"
}
]
},
"asset": {
"type": "string"
},
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"fee": {
"type": "object",
"properties": {
"estimatedMax": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,38})$",
"description": "u128 as a decimal string. The pattern allows up to 39 digits; values above 2^128-1 are rejected by the codec and wallet with -32602."
},
"used": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,38})$",
"description": "u128 as a decimal string. The pattern allows up to 39 digits; values above 2^128-1 are rejected by the codec and wallet with -32602."
},
"gasLimit": {
"type": "string",
"pattern": "^[0-9]+$"
}
}
},
"proving": {
"type": "object",
"required": [
"phase"
],
"properties": {
"phase": {
"anyOf": [
{
"type": "string",
"const": "preparing"
},
{
"type": "string",
"const": "proving"
},
{
"type": "string",
"const": "submitting"
},
{
"type": "string",
"const": "waiting_for_block"
}
]
},
"progress": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"etaSeconds": {
"type": "integer",
"minimum": 0
},
"startedAt": {
"type": "string",
"format": "date-time"
}
}
},
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {}
}
}
}
}
}lez_signMessage
LWS-0 (needs the lez.message.sign intent).
User-facing. Open it with the lez.message.sign intent; the wallet shows its own sheet.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
account | string | yes | Base58-encoded 32-byte LEZ account id |
message | string | yes |
Result
object: signature, publicKey, tag
JSON Schema
{
"params": {
"type": "object",
"required": [
"account",
"message"
],
"properties": {
"account": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
"message": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
}
}
},
"result": {
"type": "object",
"required": [
"signature",
"publicKey",
"tag"
],
"properties": {
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"tag": {
"type": "string",
"const": "LEZ/message/v1"
}
}
}
}lez_signIn
LWS-0 (needs the lez.wallet.sign_in intent).
User-facing. Open it with the lez.wallet.sign_in intent; the wallet shows its own sheet.
Params
No parameters.
Result
object: account, signedMessage, signature
JSON Schema
{
"params": {
"allOf": [
{
"type": "object",
"required": [
"domain",
"uri",
"nonce",
"issuedAt"
],
"properties": {
"domain": {
"type": "string",
"maxLength": 253
},
"statement": {
"type": "string",
"maxLength": 512
},
"uri": {
"type": "string",
"maxLength": 2048
},
"nonce": {
"type": "string",
"minLength": 8,
"maxLength": 64
},
"issuedAt": {
"type": "string",
"format": "date-time"
},
"expirationTime": {
"type": "string",
"format": "date-time"
},
"notBefore": {
"type": "string",
"format": "date-time"
},
"requestId": {
"type": "string",
"maxLength": 64
}
}
},
{
"type": "object",
"properties": {
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
}
}
}
]
},
"result": {
"type": "object",
"required": [
"account",
"signedMessage",
"signature"
],
"properties": {
"account": {
"type": "object",
"required": [
"address",
"kind",
"chain",
"capabilities"
],
"properties": {
"address": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
},
"kind": {
"anyOf": [
{
"type": "string",
"const": "public"
},
{
"type": "string",
"const": "private"
}
]
},
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"publicKey": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
},
"label": {
"type": "string",
"maxLength": 64
},
"capabilities": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "accounts"
},
{
"type": "string",
"const": "read_public"
},
{
"type": "string",
"const": "read_private"
},
{
"type": "string",
"const": "propose_tx"
},
{
"type": "string",
"const": "sign_message"
},
{
"type": "string",
"const": "request_proof"
}
]
}
}
}
},
"signedMessage": {
"type": "string"
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
"maxLength": 65000
}
}
}
}lez_requestFunds
LWS-0 (needs the lez.wallet.request_funds intent).
User-facing. Open it with the lez.wallet.request_funds intent; the wallet shows its own sheet.
Behaviour
- Opens the wallet's faucet sheet (the testnet faucet, or the debug genesis
faucet on a local sequencer). The account must be one the
user shared with your app; otherwise
Unauthorized. - The faucet only pays public accounts. For a private target the wallet
pays one of the user's public accounts (returned as
fundedAccount) and queues a shield into the private account for the user to approve (shieldHandle). That public account is linked to the private one on chain, and the sheet says so. statusisfunded,rate_limited(withretryAfterSeconds),outcome_unknownorrejected(withreason). Onoutcome_unknown, don't request again: watch the balance offundedAccount(or the target, when it is public) for a bounded time, because a second request could pay twice.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | yes | CAIP-2 chain id, e.g. "lez:testnet" |
account | string | string | yes |
Result
object: status, amount, retryAfterSeconds, txHash, shieldHandle, fundedAccount, reason
JSON Schema
{
"params": {
"type": "object",
"required": [
"chain",
"account"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
},
"account": {
"anyOf": [
{
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
{
"type": "string",
"pattern": "^pvt_[A-Za-z0-9_-]{16,64}$",
"description": "Opaque per-origin private account handle"
}
]
}
}
},
"result": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"const": "funded"
},
{
"type": "string",
"const": "rate_limited"
},
{
"type": "string",
"const": "rejected"
},
{
"type": "string",
"const": "outcome_unknown"
}
]
},
"amount": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,38})$",
"description": "u128 as a decimal string. The pattern allows up to 39 digits; values above 2^128-1 are rejected by the codec and wallet with -32602."
},
"retryAfterSeconds": {
"type": "integer",
"minimum": 0
},
"txHash": {
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"shieldHandle": {
"type": "string"
},
"fundedAccount": {
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "Base58-encoded 32-byte LEZ account id"
},
"reason": {
"type": "string",
"maxLength": 256
}
}
}
}lez_switchChain
LWS-0 (needs the wallet UI).
User-facing. Open it with the (wallet UI only) intent; the wallet shows its own sheet.
Params
| Name | Type | Required | Notes |
|---|---|---|---|
chain | string | yes | CAIP-2 chain id, e.g. "lez:testnet" |
Result
null
JSON Schema
{
"params": {
"type": "object",
"required": [
"chain"
],
"properties": {
"chain": {
"type": "string",
"pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$",
"description": "CAIP-2 chain id, e.g. \"lez:testnet\""
}
}
},
"result": {
"type": "null"
}
}