@effectstream/wallets 0.100.15 → 0.100.16
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/README.md +19 -14
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -6,6 +6,11 @@ wait for them to be processed. Spans MetaMask (and any EVM-injected
|
|
|
6
6
|
wallet), Cardano (CIP-30), Midnight, Mina, Polkadot, Algorand, and
|
|
7
7
|
Avail.
|
|
8
8
|
|
|
9
|
+
- Browser wallet connectors plus the runtime client a frontend uses to log in, sign, and submit.
|
|
10
|
+
- Spans MetaMask + injected EVM, Cardano (CIP-30), Midnight, Mina, Polkadot, Algorand, Avail.
|
|
11
|
+
- Used together with `@effectstream/crypto` (server-side verification).
|
|
12
|
+
- High-level helpers `walletLogin` and `sendTransaction` hide the polling loop.
|
|
13
|
+
|
|
9
14
|
## Install
|
|
10
15
|
|
|
11
16
|
```bash
|
|
@@ -69,27 +74,27 @@ hide the polling loop.
|
|
|
69
74
|
|
|
70
75
|
Login + signing:
|
|
71
76
|
|
|
72
|
-
- `walletLogin(args)
|
|
73
|
-
- `EffectstreamConfig
|
|
77
|
+
- `walletLogin(args)`: top-level helper that discovers, connects, and produces a signed batcher login.
|
|
78
|
+
- `EffectstreamConfig`: runtime config (chain URLs, batcher URL, ...) the helpers consume.
|
|
74
79
|
- `signMessage(wallet, message)` — sign an arbitrary message with the connected wallet.
|
|
75
80
|
|
|
76
81
|
Sending transactions:
|
|
77
82
|
|
|
78
|
-
- `sendTransaction(wallet, conciseInput, opts?)
|
|
79
|
-
- `sendBatcherTransaction(...)
|
|
80
|
-
- `sendSelfSequencedTransaction(...)`
|
|
83
|
+
- `sendTransaction(wallet, conciseInput, opts?)`: submit through the batcher and (by default) wait for processing.
|
|
84
|
+
- `sendBatcherTransaction(...)`: explicit batcher submission.
|
|
85
|
+
- `sendSelfSequencedTransaction(...)` bypasses the batcher.
|
|
81
86
|
- `waitForEffectstreamBlockProcessed(...)` — block-height poller used by the above.
|
|
82
87
|
|
|
83
88
|
Wallet discovery / identification:
|
|
84
89
|
|
|
85
|
-
- `WalletMode
|
|
86
|
-
- `WalletNameMap
|
|
87
|
-
- `allInjectedWallets(config)`
|
|
88
|
-
- `getAddressType(walletMode)`
|
|
90
|
+
- `WalletMode`: enum of `EvmInjected`, `EvmEthers`, `Midnight`, `Cardano`, `Polkadot`, `Algorand`, `Mina`, `AvailJs`.
|
|
91
|
+
- `WalletNameMap`: `Record<WalletMode, string>` for display.
|
|
92
|
+
- `allInjectedWallets(config)` lists installed wallets in the browser.
|
|
93
|
+
- `getAddressType(walletMode)` maps a `WalletMode` to its `@effectstream/utils` `AddressType`.
|
|
89
94
|
|
|
90
95
|
Types:
|
|
91
96
|
|
|
92
|
-
- `Wallet
|
|
97
|
+
- `Wallet`: handle returned by `walletLogin`, used by send/sign helpers.
|
|
93
98
|
- `UserSignature`, `Hash`, `BatcherPostResponse`, `BatcherTrackResponse`, `PostDataResponse`, `PostDataResponseAsync`, `SignFunction`.
|
|
94
99
|
|
|
95
100
|
Lower-level connector machinery (used internally; export surface is
|
|
@@ -105,11 +110,11 @@ Runnable: [`src/utils.test.ts`](./src/utils.test.ts) and
|
|
|
105
110
|
Real-world usage in templates (each imports `walletLogin`, `WalletMode`,
|
|
106
111
|
`EffectstreamConfig`, `sendTransaction`):
|
|
107
112
|
|
|
108
|
-
- [`templates/chess-v2/`](https://github.com/
|
|
109
|
-
- [`templates/evm-midnight-v2/`](https://github.com/
|
|
110
|
-
- [`templates/shinkai-v2/`](https://github.com/
|
|
113
|
+
- [`templates/chess-v2/`](https://github.com/effectstream/effectstream/tree/main/templates/chess-v2)
|
|
114
|
+
- [`templates/evm-midnight-v2/`](https://github.com/effectstream/effectstream/tree/main/templates/evm-midnight-v2)
|
|
115
|
+
- [`templates/shinkai-v2/`](https://github.com/effectstream/effectstream/tree/main/templates/shinkai-v2)
|
|
111
116
|
|
|
112
117
|
## Links
|
|
113
118
|
|
|
114
119
|
- Docs: https://effectstream.github.io/docs/packages/sdk/wallets
|
|
115
|
-
- Source: https://github.com/
|
|
120
|
+
- Source: https://github.com/effectstream/effectstream/tree/main/packages/effectstream-sdk/wallets
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effectstream/wallets",
|
|
3
|
-
"version": "0.100.
|
|
3
|
+
"version": "0.100.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://effectstream.github.io/docs/",
|
|
6
6
|
"repository": {
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"exports": "./src/mod.ts",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@effectstream/concise": "0.100.
|
|
17
|
-
"@effectstream/crypto": "0.100.
|
|
18
|
-
"@effectstream/event-client": "0.100.
|
|
19
|
-
"@effectstream/utils": "0.100.
|
|
16
|
+
"@effectstream/concise": "0.100.16",
|
|
17
|
+
"@effectstream/crypto": "0.100.16",
|
|
18
|
+
"@effectstream/event-client": "0.100.16",
|
|
19
|
+
"@effectstream/utils": "0.100.16",
|
|
20
20
|
"@aurowallet/mina-provider": "^1.0.12",
|
|
21
21
|
"@metamask/providers": "^22.1.0",
|
|
22
22
|
"@midnight-ntwrk/dapp-connector-api": "4.0.1",
|