@vorionsys/basis 1.0.1
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/.env.example +22 -0
- package/AMOY-MIGRATION.md +188 -0
- package/DEPLOY-AMOY.md +368 -0
- package/DEPLOY-NOW.md +216 -0
- package/DEPLOYMENT.md +239 -0
- package/GET-WALLET.md +286 -0
- package/QUICK-WALLET-SETUP.md +268 -0
- package/README.md +195 -0
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +236 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +204 -0
- package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +328 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json +113 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json +97 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json +114 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +444 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +296 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +45 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol/ERC721Enumerable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol/ERC721Enumerable.json +521 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +476 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol/IERC721Enumerable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol/IERC721Enumerable.json +352 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +341 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +37 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +65 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +10 -0
- package/artifacts/build-info/357d1bba4062d461f497f221490811a3.json +1 -0
- package/artifacts/contracts/AgentCard.sol/AgentCard.dbg.json +4 -0
- package/artifacts/contracts/AgentCard.sol/AgentCard.json +1430 -0
- package/build_errors.txt +0 -0
- package/build_output.txt +0 -0
- package/cache/solidity-files-cache.json +885 -0
- package/contracts/AgentCard.sol +478 -0
- package/contracts/deploy/01-deploy-agentcard.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/kya/accountability.d.ts.map +1 -0
- package/dist/kya/accountability.js +100 -0
- package/dist/kya/authorization.d.ts.map +1 -0
- package/dist/kya/authorization.js +258 -0
- package/dist/kya/behavior.d.ts.map +1 -0
- package/dist/kya/behavior.js +142 -0
- package/dist/kya/identity.d.ts.map +1 -0
- package/dist/kya/identity.js +187 -0
- package/dist/kya/index.d.ts.map +1 -0
- package/dist/kya/index.js +99 -0
- package/dist/kya/types.d.ts.map +1 -0
- package/dist/kya/types.js +5 -0
- package/dist/trust-1000-agents.test.d.ts.map +1 -0
- package/dist/trust-1000-agents.test.js +608 -0
- package/dist/trust-capabilities.d.ts.map +1 -0
- package/dist/trust-capabilities.js +478 -0
- package/dist/trust-factors.d.ts.map +1 -0
- package/dist/trust-factors.js +588 -0
- package/dist/trust-factors.test.d.ts.map +1 -0
- package/dist/trust-factors.test.js +179 -0
- package/dist/validation-gate.d.ts.map +1 -0
- package/dist/validation-gate.js +468 -0
- package/dist/validation-gate.test.d.ts.map +1 -0
- package/dist/validation-gate.test.js +419 -0
- package/hardhat.config.ts +55 -0
- package/package.json +57 -0
- package/scripts/certify-agent.ts +91 -0
- package/scripts/deploy-agentcard.ts +63 -0
- package/scripts/mint-agentcard.ts +87 -0
- package/specs/adversarial-sandbox-test-suite.md +1055 -0
- package/specs/kya-framework.md +910 -0
- package/specs/trust-factors-v2.md +437 -0
- package/src/index.ts +14 -0
- package/src/kya/accountability.ts +132 -0
- package/src/kya/authorization.ts +325 -0
- package/src/kya/behavior.ts +169 -0
- package/src/kya/identity.ts +224 -0
- package/src/kya/index.ts +125 -0
- package/src/kya/types.ts +242 -0
- package/src/trust-1000-agents.test.ts +745 -0
- package/src/trust-capabilities.ts +517 -0
- package/src/trust-factors.test.ts +241 -0
- package/src/trust-factors.ts +666 -0
- package/src/validation-gate.test.ts +531 -0
- package/src/validation-gate.ts +665 -0
- package/test-kya-simple.ts +258 -0
- package/test-kya.ts +245 -0
- package/tsconfig.json +14 -0
- package/typechain-types/@openzeppelin/contracts/access/AccessControl.ts +324 -0
- package/typechain-types/@openzeppelin/contracts/access/IAccessControl.ts +292 -0
- package/typechain-types/@openzeppelin/contracts/access/index.ts +5 -0
- package/typechain-types/@openzeppelin/contracts/index.ts +11 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/IERC4906.ts +462 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
- package/typechain-types/@openzeppelin/contracts/interfaces/index.ts +6 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/ERC721.ts +420 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721.ts +393 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.ts +110 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.ts +470 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.ts +489 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.ts +443 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.ts +420 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/index.ts +7 -0
- package/typechain-types/@openzeppelin/contracts/token/ERC721/index.ts +8 -0
- package/typechain-types/@openzeppelin/contracts/token/index.ts +5 -0
- package/typechain-types/@openzeppelin/contracts/utils/Strings.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/utils/index.ts +8 -0
- package/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.ts +94 -0
- package/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.ts +94 -0
- package/typechain-types/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
- package/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.ts +69 -0
- package/typechain-types/@openzeppelin/contracts/utils/math/index.ts +4 -0
- package/typechain-types/@openzeppelin/index.ts +5 -0
- package/typechain-types/common.ts +131 -0
- package/typechain-types/contracts/AgentCard.ts +1415 -0
- package/typechain-types/contracts/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/contracts/access/AccessControl__factory.ts +250 -0
- package/typechain-types/factories/@openzeppelin/contracts/access/IAccessControl__factory.ts +218 -0
- package/typechain-types/factories/@openzeppelin/contracts/access/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/index.ts +7 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC4906__factory.ts +339 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.ts +127 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.ts +111 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.ts +128 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.ts +6 -0
- package/typechain-types/factories/@openzeppelin/contracts/interfaces/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.ts +455 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.ts +59 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.ts +307 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable__factory.ts +535 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage__factory.ts +490 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable__factory.ts +366 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata__factory.ts +355 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/index.ts +7 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/ERC721/index.ts +7 -0
- package/typechain-types/factories/@openzeppelin/contracts/token/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.ts +90 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/index.ts +6 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.ts +41 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.ts +41 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.ts +5 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.ts +118 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/math/index.ts +4 -0
- package/typechain-types/factories/@openzeppelin/index.ts +4 -0
- package/typechain-types/factories/contracts/AgentCard__factory.ts +1480 -0
- package/typechain-types/factories/contracts/index.ts +4 -0
- package/typechain-types/factories/index.ts +5 -0
- package/typechain-types/index.ts +44 -0
- package/vitest.config.ts +8 -0
package/GET-WALLET.md
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# 🦊 How to Get a Wallet for Deployment
|
|
2
|
+
|
|
3
|
+
## Option 1: MetaMask (Recommended)
|
|
4
|
+
|
|
5
|
+
### Install MetaMask
|
|
6
|
+
|
|
7
|
+
**Browser Extension**:
|
|
8
|
+
- Chrome: https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn
|
|
9
|
+
- Firefox: https://addons.mozilla.org/firefox/addon/ether-metamask/
|
|
10
|
+
- Edge: https://microsoftedge.microsoft.com/addons/detail/metamask/
|
|
11
|
+
|
|
12
|
+
Or visit: **https://metamask.io/download/**
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Create Your Wallet
|
|
17
|
+
|
|
18
|
+
### Step 1: Install & Open MetaMask
|
|
19
|
+
|
|
20
|
+
1. Click the MetaMask extension icon
|
|
21
|
+
2. Click **"Create a new wallet"**
|
|
22
|
+
3. Agree to terms
|
|
23
|
+
|
|
24
|
+
### Step 2: Create Password
|
|
25
|
+
|
|
26
|
+
- Choose a strong password
|
|
27
|
+
- This password is only for this device
|
|
28
|
+
|
|
29
|
+
### Step 3: Save Recovery Phrase ⚠️ CRITICAL
|
|
30
|
+
|
|
31
|
+
MetaMask will show you a **12-word secret recovery phrase**
|
|
32
|
+
|
|
33
|
+
**⚠️ EXTREMELY IMPORTANT**:
|
|
34
|
+
- ✅ Write it down on paper (don't screenshot!)
|
|
35
|
+
- ✅ Store it safely (locked drawer, safe, etc.)
|
|
36
|
+
- ✅ Never share it with anyone
|
|
37
|
+
- ✅ Never enter it on any website
|
|
38
|
+
- ❌ If you lose it, you lose access to your wallet FOREVER
|
|
39
|
+
- ❌ If someone gets it, they can steal your funds
|
|
40
|
+
|
|
41
|
+
Example format:
|
|
42
|
+
```
|
|
43
|
+
1. apple
|
|
44
|
+
2. banana
|
|
45
|
+
3. cherry
|
|
46
|
+
... (12 words total)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 4: Confirm Recovery Phrase
|
|
50
|
+
|
|
51
|
+
- MetaMask will ask you to select words in order
|
|
52
|
+
- This confirms you saved it correctly
|
|
53
|
+
|
|
54
|
+
### Step 5: Wallet Created! 🎉
|
|
55
|
+
|
|
56
|
+
You now have:
|
|
57
|
+
- ✅ A wallet address (looks like: `0x1234...5678`)
|
|
58
|
+
- ✅ A private key (we'll export this next)
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Get Your Private Key
|
|
63
|
+
|
|
64
|
+
### For Testnet Deployment (What You Need)
|
|
65
|
+
|
|
66
|
+
⚠️ **IMPORTANT**: We'll create a SEPARATE testnet-only wallet for safety!
|
|
67
|
+
|
|
68
|
+
#### Create Testnet-Only Account
|
|
69
|
+
|
|
70
|
+
1. Click the account icon (circle with colored pattern)
|
|
71
|
+
2. Click **"Add account or hardware wallet"**
|
|
72
|
+
3. Select **"Add a new Ethereum account"**
|
|
73
|
+
4. Name it: `Testnet Only - Amoy`
|
|
74
|
+
5. Click **"Create"**
|
|
75
|
+
|
|
76
|
+
#### Export Private Key
|
|
77
|
+
|
|
78
|
+
1. Click the three dots (⋮) next to the account name
|
|
79
|
+
2. Select **"Account details"**
|
|
80
|
+
3. Click **"Show private key"**
|
|
81
|
+
4. Enter your MetaMask password
|
|
82
|
+
5. Click **"Hold to reveal Private Key"**
|
|
83
|
+
6. **Copy the private key** (looks like: `0xabc123...`)
|
|
84
|
+
|
|
85
|
+
**⚠️ Security Tips**:
|
|
86
|
+
- ✅ Only use this account for testnet
|
|
87
|
+
- ✅ Never send real money to this address
|
|
88
|
+
- ✅ The private key should start with `0x`
|
|
89
|
+
- ✅ It should be 66 characters total (0x + 64 hex chars)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Add Private Key to .env
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
cd C:\Axiom\packages\basis
|
|
97
|
+
|
|
98
|
+
# Open .env file
|
|
99
|
+
code .env # or: notepad .env
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Add your private key:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Your testnet-only private key (starts with 0x)
|
|
106
|
+
PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE
|
|
107
|
+
|
|
108
|
+
# Amoy RPC (already configured)
|
|
109
|
+
AMOY_RPC_URL=https://rpc-amoy.polygon.technology
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Save the file.
|
|
113
|
+
|
|
114
|
+
**⚠️ NEVER commit .env to git!** (It's already in .gitignore)
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Add Polygon Amoy Network to MetaMask
|
|
119
|
+
|
|
120
|
+
### Automatic (Recommended)
|
|
121
|
+
|
|
122
|
+
Visit: **https://chainlist.org/?search=amoy**
|
|
123
|
+
1. Search for "Amoy"
|
|
124
|
+
2. Click **"Add to MetaMask"**
|
|
125
|
+
3. Approve in MetaMask
|
|
126
|
+
|
|
127
|
+
### Manual
|
|
128
|
+
|
|
129
|
+
1. Open MetaMask
|
|
130
|
+
2. Click network dropdown (top left)
|
|
131
|
+
3. Click **"Add network"**
|
|
132
|
+
4. Click **"Add a network manually"**
|
|
133
|
+
5. Enter details:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Network Name: Polygon Amoy Testnet
|
|
137
|
+
RPC URL: https://rpc-amoy.polygon.technology
|
|
138
|
+
Chain ID: 80002
|
|
139
|
+
Currency Symbol: POL
|
|
140
|
+
Block Explorer: https://amoy.polygonscan.com
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
6. Click **"Save"**
|
|
144
|
+
7. Switch to Amoy network
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Get Testnet POL Tokens
|
|
149
|
+
|
|
150
|
+
### Polygon Faucet
|
|
151
|
+
|
|
152
|
+
1. Visit: **https://faucet.polygon.technology/**
|
|
153
|
+
2. Select **"Amoy"** network
|
|
154
|
+
3. Copy your wallet address from MetaMask
|
|
155
|
+
- Click the address to copy it
|
|
156
|
+
4. Paste your address in the faucet
|
|
157
|
+
5. Click **"Submit"**
|
|
158
|
+
6. Wait 1-2 minutes
|
|
159
|
+
|
|
160
|
+
You should receive **1-2 POL** tokens for testing.
|
|
161
|
+
|
|
162
|
+
**Check Balance in MetaMask**:
|
|
163
|
+
- Switch to Amoy network
|
|
164
|
+
- Your POL balance will show
|
|
165
|
+
|
|
166
|
+
### Alternative Faucets
|
|
167
|
+
|
|
168
|
+
If the main faucet doesn't work:
|
|
169
|
+
- https://www.alchemy.com/faucets/polygon-amoy
|
|
170
|
+
- https://www.allthatnode.com/faucet/polygon.dsrv
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Security Best Practices
|
|
175
|
+
|
|
176
|
+
### ✅ DO
|
|
177
|
+
|
|
178
|
+
1. **Use separate wallets for testnet and mainnet**
|
|
179
|
+
- Create "Testnet Only" account in MetaMask
|
|
180
|
+
- Never mix test and real funds
|
|
181
|
+
|
|
182
|
+
2. **Keep recovery phrase offline**
|
|
183
|
+
- Write on paper, store safely
|
|
184
|
+
- Never in cloud, screenshots, or digital notes
|
|
185
|
+
|
|
186
|
+
3. **Never share private keys or recovery phrase**
|
|
187
|
+
- Not with support, not in Discord/Telegram
|
|
188
|
+
- Real support never asks for these
|
|
189
|
+
|
|
190
|
+
4. **Double-check network before transactions**
|
|
191
|
+
- Make sure you're on Amoy (testnet)
|
|
192
|
+
- Testnet transactions are free/cheap
|
|
193
|
+
|
|
194
|
+
### ❌ DON'T
|
|
195
|
+
|
|
196
|
+
1. ❌ Use your main wallet for testing
|
|
197
|
+
2. ❌ Store private keys in code or screenshots
|
|
198
|
+
3. ❌ Commit .env file to git (it's already gitignored)
|
|
199
|
+
4. ❌ Share your screen showing private keys
|
|
200
|
+
5. ❌ Click random links asking to "connect wallet"
|
|
201
|
+
6. ❌ Send real money to testnet addresses
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Verify Your Setup
|
|
206
|
+
|
|
207
|
+
### Check 1: Private Key Format
|
|
208
|
+
|
|
209
|
+
Your private key should:
|
|
210
|
+
- Start with `0x`
|
|
211
|
+
- Be exactly 66 characters (0x + 64 hex characters)
|
|
212
|
+
- Example: `0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef`
|
|
213
|
+
|
|
214
|
+
### Check 2: Network
|
|
215
|
+
|
|
216
|
+
In MetaMask:
|
|
217
|
+
- Network should show "Polygon Amoy Testnet"
|
|
218
|
+
- Currency should be "POL" (not MATIC)
|
|
219
|
+
|
|
220
|
+
### Check 3: Balance
|
|
221
|
+
|
|
222
|
+
- You should have 1-2 POL
|
|
223
|
+
- Shown in MetaMask on Amoy network
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## You're Ready! ✅
|
|
228
|
+
|
|
229
|
+
Checklist:
|
|
230
|
+
- ✅ MetaMask installed
|
|
231
|
+
- ✅ Testnet-only account created
|
|
232
|
+
- ✅ Private key exported
|
|
233
|
+
- ✅ Private key added to `.env` file
|
|
234
|
+
- ✅ Amoy network added to MetaMask
|
|
235
|
+
- ✅ POL tokens received from faucet
|
|
236
|
+
|
|
237
|
+
**Next step**: Deploy your contract!
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
cd C:\Axiom\packages\basis
|
|
241
|
+
npx hardhat run scripts/deploy-agentcard.ts --network amoy
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Need Help?
|
|
247
|
+
|
|
248
|
+
### MetaMask Support
|
|
249
|
+
- https://support.metamask.io/
|
|
250
|
+
- https://metamask.io/faqs/
|
|
251
|
+
|
|
252
|
+
### Polygon Faucet Issues
|
|
253
|
+
- Try different faucet from alternatives above
|
|
254
|
+
- Make sure you're on Amoy network
|
|
255
|
+
- Check your address is correct (starts with 0x)
|
|
256
|
+
|
|
257
|
+
### Private Key Issues
|
|
258
|
+
- Must start with `0x`
|
|
259
|
+
- Must be 66 characters total
|
|
260
|
+
- Must be from the account you want to deploy with
|
|
261
|
+
- Don't include quotes in .env file
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Example .env File
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# Your testnet-only private key
|
|
269
|
+
PRIVATE_KEY=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
|
|
270
|
+
|
|
271
|
+
# Amoy RPC URL (default works fine)
|
|
272
|
+
AMOY_RPC_URL=https://rpc-amoy.polygon.technology
|
|
273
|
+
|
|
274
|
+
# Optional: PolygonScan API key for verification
|
|
275
|
+
POLYGONSCAN_API_KEY=
|
|
276
|
+
|
|
277
|
+
# Optional: Gas reporting
|
|
278
|
+
REPORT_GAS=false
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
**You're all set! Happy deploying! 🚀**
|
|
284
|
+
|
|
285
|
+
**Time to complete**: 10-15 minutes
|
|
286
|
+
**Cost**: Free (testnet POL is free)
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# 🚀 Quick Wallet Setup - Updated for 2026 MetaMask
|
|
2
|
+
|
|
3
|
+
## Can't Find the Buttons? Here's What to Look For:
|
|
4
|
+
|
|
5
|
+
### MetaMask Changed Their UI! Here's the Current Version:
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Method 1: MetaMask (Current 2026 UI)
|
|
10
|
+
|
|
11
|
+
### Install MetaMask
|
|
12
|
+
|
|
13
|
+
1. Go to: **https://metamask.io/download/**
|
|
14
|
+
2. Click the big **"Install MetaMask for [Your Browser]"** button
|
|
15
|
+
3. Browser will ask to add extension → Click **"Add Extension"**
|
|
16
|
+
4. Pin it to your toolbar (click puzzle icon → pin MetaMask)
|
|
17
|
+
|
|
18
|
+
### Create Wallet (New Flow)
|
|
19
|
+
|
|
20
|
+
**After installing, MetaMask opens automatically:**
|
|
21
|
+
|
|
22
|
+
1. **Welcome screen** → Click **"Create a new wallet"** (blue button)
|
|
23
|
+
|
|
24
|
+
2. **Help us improve** → Click **"I agree"** (or "No thanks" - doesn't matter)
|
|
25
|
+
|
|
26
|
+
3. **Create password** screen:
|
|
27
|
+
- Enter a strong password
|
|
28
|
+
- Check the box "I understand..."
|
|
29
|
+
- Click **"Create a new wallet"**
|
|
30
|
+
|
|
31
|
+
4. **Secure your wallet** screen:
|
|
32
|
+
- Watch the short video (or skip)
|
|
33
|
+
- Click **"Secure my wallet (recommended)"**
|
|
34
|
+
|
|
35
|
+
5. **Secret Recovery Phrase** screen:
|
|
36
|
+
- Click **"Reveal Secret Recovery Phrase"**
|
|
37
|
+
- ⚠️ **WRITE DOWN ALL 12 WORDS** (on paper!)
|
|
38
|
+
- Click **"Next"**
|
|
39
|
+
|
|
40
|
+
6. **Confirm Recovery Phrase**:
|
|
41
|
+
- Click the words in the correct order
|
|
42
|
+
- Click **"Confirm"**
|
|
43
|
+
|
|
44
|
+
7. **Wallet Created!** → Click **"Got it!"**
|
|
45
|
+
|
|
46
|
+
### Get Your Private Key
|
|
47
|
+
|
|
48
|
+
**In MetaMask:**
|
|
49
|
+
|
|
50
|
+
1. Click the **account avatar/circle** (top right)
|
|
51
|
+
- OR click the three horizontal lines (≡) if you see that instead
|
|
52
|
+
|
|
53
|
+
2. Look for **"Account details"** or click **Settings ⚙️** → **"Account details"**
|
|
54
|
+
|
|
55
|
+
3. You'll see your wallet address and QR code
|
|
56
|
+
|
|
57
|
+
4. Click **"Show private key"** button
|
|
58
|
+
|
|
59
|
+
5. Enter your MetaMask password
|
|
60
|
+
|
|
61
|
+
6. **Click and HOLD** the button that says "Hold to reveal Private Key"
|
|
62
|
+
|
|
63
|
+
7. Your private key appears!
|
|
64
|
+
- It starts with `0x`
|
|
65
|
+
- It's 66 characters long
|
|
66
|
+
- Click to copy it
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Method 2: Generate Private Key (Command Line - Easiest!)
|
|
71
|
+
|
|
72
|
+
If MetaMask is confusing, let's just generate a key directly:
|
|
73
|
+
|
|
74
|
+
### Option A: Node.js Script
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
cd C:\Axiom\packages\basis
|
|
78
|
+
|
|
79
|
+
# Create a script
|
|
80
|
+
echo "const ethers = require('ethers'); const wallet = ethers.Wallet.createRandom(); console.log('Address:', wallet.address); console.log('Private Key:', wallet.privateKey);" > generate-wallet.js
|
|
81
|
+
|
|
82
|
+
# Run it
|
|
83
|
+
node generate-wallet.js
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This will output:
|
|
87
|
+
```
|
|
88
|
+
Address: 0x1234567890abcdef1234567890abcdef12345678
|
|
89
|
+
Private Key: 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Copy the Private Key** → Add to `.env`
|
|
93
|
+
|
|
94
|
+
### Option B: Python Script
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Create script
|
|
98
|
+
cat > generate_wallet.py << 'EOF'
|
|
99
|
+
from eth_account import Account
|
|
100
|
+
import secrets
|
|
101
|
+
|
|
102
|
+
# Generate random private key
|
|
103
|
+
private_key = "0x" + secrets.token_hex(32)
|
|
104
|
+
account = Account.from_key(private_key)
|
|
105
|
+
|
|
106
|
+
print(f"Address: {account.address}")
|
|
107
|
+
print(f"Private Key: {private_key}")
|
|
108
|
+
EOF
|
|
109
|
+
|
|
110
|
+
# Run it
|
|
111
|
+
python generate_wallet.py
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Method 3: Use a Test/Sample Private Key
|
|
117
|
+
|
|
118
|
+
**FOR TESTNET ONLY - DO NOT USE FOR REAL MONEY!**
|
|
119
|
+
|
|
120
|
+
Here's a sample testnet key you can use right now:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Open .env
|
|
124
|
+
cd C:\Axiom\packages\basis
|
|
125
|
+
notepad .env
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Add this (TESTNET ONLY):
|
|
129
|
+
```bash
|
|
130
|
+
# TEST PRIVATE KEY - TESTNET ONLY!
|
|
131
|
+
PRIVATE_KEY=0x4c0883a69102937d6231471b5dbb6204fe512961708279f8e4f6d1c4e8d0e0a2
|
|
132
|
+
|
|
133
|
+
# Amoy RPC
|
|
134
|
+
AMOY_RPC_URL=https://rpc-amoy.polygon.technology
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**⚠️ IMPORTANT**:
|
|
138
|
+
- This key is PUBLIC (from examples)
|
|
139
|
+
- Only use on TESTNET
|
|
140
|
+
- Never send real money to this address
|
|
141
|
+
- Create your own key for production!
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Quick Test - Do You Have a Key?
|
|
146
|
+
|
|
147
|
+
Your private key should look like:
|
|
148
|
+
```
|
|
149
|
+
0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Check:
|
|
153
|
+
- ✅ Starts with `0x`
|
|
154
|
+
- ✅ 66 characters total (0x + 64 hex digits)
|
|
155
|
+
- ✅ Only contains: 0-9 and a-f
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Now Get Test POL Tokens
|
|
160
|
+
|
|
161
|
+
### Step 1: Get Your Wallet Address
|
|
162
|
+
|
|
163
|
+
**If using MetaMask:**
|
|
164
|
+
- Open MetaMask
|
|
165
|
+
- Click on your account name/address at top
|
|
166
|
+
- It copies to clipboard
|
|
167
|
+
- It looks like: `0x1234...5678`
|
|
168
|
+
|
|
169
|
+
**If using generated key:**
|
|
170
|
+
Use this tool to get address from private key:
|
|
171
|
+
```bash
|
|
172
|
+
cd C:\Axiom\packages\basis
|
|
173
|
+
node -e "const ethers = require('ethers'); const wallet = new ethers.Wallet('YOUR_PRIVATE_KEY'); console.log('Address:', wallet.address);"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Step 2: Get Free POL
|
|
177
|
+
|
|
178
|
+
1. Visit: **https://faucet.polygon.technology/**
|
|
179
|
+
2. Select **"Polygon Amoy"** from dropdown
|
|
180
|
+
3. Paste your wallet address
|
|
181
|
+
4. Click **"Submit"**
|
|
182
|
+
5. Wait 1-2 minutes
|
|
183
|
+
|
|
184
|
+
You'll receive 1 POL (enough for ~50 deployments!)
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Verify Setup
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
cd C:\Axiom\packages\basis
|
|
192
|
+
|
|
193
|
+
# Check if .env has your key
|
|
194
|
+
cat .env
|
|
195
|
+
|
|
196
|
+
# Should show:
|
|
197
|
+
# PRIVATE_KEY=0x...
|
|
198
|
+
# AMOY_RPC_URL=https://rpc-amoy.polygon.technology
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Ready to Deploy!
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
cd C:\Axiom\packages\basis
|
|
207
|
+
|
|
208
|
+
# This will work if:
|
|
209
|
+
# 1. You have a private key in .env
|
|
210
|
+
# 2. You got POL from the faucet
|
|
211
|
+
npx hardhat run scripts/deploy-agentcard.ts --network amoy
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Still Stuck?
|
|
217
|
+
|
|
218
|
+
Tell me:
|
|
219
|
+
1. **Which method are you trying?** (MetaMask, Node.js, or test key)
|
|
220
|
+
2. **What error/message do you see?**
|
|
221
|
+
3. **What step are you on?**
|
|
222
|
+
|
|
223
|
+
I'll help you get unstuck!
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Screenshots Locations
|
|
228
|
+
|
|
229
|
+
**In MetaMask (current version):**
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
MetaMask Icon (fox)
|
|
233
|
+
→ Account circle/avatar (top right)
|
|
234
|
+
→ "Account details"
|
|
235
|
+
→ "Show private key"
|
|
236
|
+
→ Hold to reveal
|
|
237
|
+
→ Copy private key
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Or:
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
MetaMask Icon
|
|
244
|
+
→ Three dots ⋮ (top right)
|
|
245
|
+
→ "Account details"
|
|
246
|
+
→ "Show private key"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Quick Summary
|
|
252
|
+
|
|
253
|
+
**Easiest Path** (2 minutes):
|
|
254
|
+
|
|
255
|
+
1. Use test private key above in .env ✅
|
|
256
|
+
2. Get POL from faucet ✅
|
|
257
|
+
3. Deploy! ✅
|
|
258
|
+
|
|
259
|
+
**Proper Path** (10 minutes):
|
|
260
|
+
|
|
261
|
+
1. Install MetaMask ✅
|
|
262
|
+
2. Create wallet (write down 12 words!) ✅
|
|
263
|
+
3. Get private key ✅
|
|
264
|
+
4. Add to .env ✅
|
|
265
|
+
5. Get POL from faucet ✅
|
|
266
|
+
6. Deploy! ✅
|
|
267
|
+
|
|
268
|
+
Choose what works for you!
|