@dimcool/wallet 0.1.29 → 0.1.30
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 +15 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @dimcool/wallet
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A quick and simple non-custodial wallet for agents — send funds to other DIM users, Solana addresses, or `.sol` usernames without any browser or OAuth setup.
|
|
4
4
|
|
|
5
5
|
Canonical docs:
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ Canonical docs:
|
|
|
12
12
|
- create/load wallets from mnemonic or private key
|
|
13
13
|
- sign Solana messages and transactions
|
|
14
14
|
- authenticate to DIM with `wallet.login(...)`
|
|
15
|
+
- send USDC to a DIM username, a Solana address, or a `.sol` domain with a single call
|
|
15
16
|
- run high-level DIM wallet actions (`send`, `getBalances`, `getInfo`)
|
|
16
17
|
|
|
17
18
|
## Install
|
|
@@ -85,7 +86,19 @@ await wallet.login({ referralCode: 'optional-referrer' });
|
|
|
85
86
|
await wallet.setUsername('agentname');
|
|
86
87
|
await wallet.getInfo();
|
|
87
88
|
await wallet.getBalances();
|
|
88
|
-
|
|
89
|
+
|
|
90
|
+
// Send to a DIM username
|
|
91
|
+
await wallet.send({ recipient: 'alice', amount: 1.25, token: 'USDC' });
|
|
92
|
+
|
|
93
|
+
// Send to a Solana address
|
|
94
|
+
await wallet.send({
|
|
95
|
+
recipient: '7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU',
|
|
96
|
+
amount: 5.0,
|
|
97
|
+
token: 'USDC',
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// Send to a .sol domain
|
|
101
|
+
await wallet.send({ recipient: 'alice.sol', amount: 0.5, token: 'USDC' });
|
|
89
102
|
```
|
|
90
103
|
|
|
91
104
|
## SDK Interoperability (Optional)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimcool/wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dev": "tsc --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dimcool/sdk": "^0.1.
|
|
32
|
+
"@dimcool/sdk": "^0.1.29",
|
|
33
33
|
"@solana/web3.js": "^1.95.4",
|
|
34
34
|
"bip39": "^3.1.0",
|
|
35
35
|
"bs58": "^6.0.0",
|