@oneie/sdk 0.16.5 → 0.17.0
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/dist/address-proof.d.ts +66 -0
- package/dist/address-proof.d.ts.map +1 -0
- package/dist/address-proof.js +244 -0
- package/dist/address-proof.js.map +1 -0
- package/dist/receivers.d.ts +41 -5
- package/dist/receivers.d.ts.map +1 -1
- package/dist/receivers.js +37 -3
- package/dist/receivers.js.map +1 -1
- package/dist/wallet.d.ts +11 -2
- package/dist/wallet.d.ts.map +1 -1
- package/dist/wallet.js +25 -3
- package/dist/wallet.js.map +1 -1
- package/dist/work-contract-grammar.json +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** The five chains, spelled the way the `wallets` row and `wallet:create` spell them. */
|
|
2
|
+
export type ProofChain = 'sui' | 'evm' | 'solana' | 'btc' | 'asi';
|
|
3
|
+
export declare const PROOF_CHAINS: readonly ProofChain[];
|
|
4
|
+
export declare function proofChain(chain: string): ProofChain | null;
|
|
5
|
+
/** What crosses the wire for one address. Both fields are hex, no 0x. */
|
|
6
|
+
export interface AddressProof {
|
|
7
|
+
/** sui: 32-byte ed25519 · btc: 33-byte compressed secp256k1 · evm/solana: optional, unused */
|
|
8
|
+
publicKey?: string;
|
|
9
|
+
signature: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ProofContext {
|
|
12
|
+
challenge: string;
|
|
13
|
+
workspace: string;
|
|
14
|
+
actor: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The exact bytes every address signs. Domain-separated by its first line so a
|
|
18
|
+
* registration signature is never a valid login or payment signature, and every
|
|
19
|
+
* field that makes it specific is inside it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function addressProofMessage(ctx: ProofContext & {
|
|
22
|
+
chain: ProofChain;
|
|
23
|
+
address: string;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* The prefixes an ASI address may carry. `fetch` is mainnet fetchhub-4, what ONE
|
|
27
|
+
* mints today; `asi` is the planned rename. Nothing else — a `cosmos1…` or any
|
|
28
|
+
* other hrp over the same 20 bytes is a different chain's address.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ASI_HRPS: readonly ["fetch", "asi"];
|
|
31
|
+
export type AsiHrp = (typeof ASI_HRPS)[number];
|
|
32
|
+
/**
|
|
33
|
+
* The same ASI account spelled under another prefix — bech32 decode, re-encode.
|
|
34
|
+
* The `wallets` columns are first-write-wins, so a `fetch1…` row is never
|
|
35
|
+
* rewritten when the chain renames to `asi`; it is SHOWN as `asi1…` through
|
|
36
|
+
* this. Pure. Null for anything that is not a 20-byte `fetch`/`asi` address, or
|
|
37
|
+
* a target prefix outside that pair — a refusal, never a mangled string.
|
|
38
|
+
*/
|
|
39
|
+
export declare function reencodeAsiAddress(address: string, hrp: AsiHrp): string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Sign one address's statement. `privateKeyHex` is the 32-byte secret from the
|
|
42
|
+
* local keygen (`WalletKey.privateKeyHex`); only public bytes come back.
|
|
43
|
+
*/
|
|
44
|
+
export declare function signAddressProof(chain: ProofChain, privateKeyHex: string, message: string): AddressProof;
|
|
45
|
+
/**
|
|
46
|
+
* Sign every address a local keygen produced, in one pass. Takes the keygen's
|
|
47
|
+
* `keys` array and returns `{ addresses, proofs }` built field by field from the
|
|
48
|
+
* known chains — a `mnemonic` or `privateKeyHex` on the input has no route
|
|
49
|
+
* into the result.
|
|
50
|
+
*/
|
|
51
|
+
export declare function proveAddresses(keys: ReadonlyArray<{
|
|
52
|
+
chain: string;
|
|
53
|
+
address: string;
|
|
54
|
+
privateKeyHex: string;
|
|
55
|
+
}>, ctx: ProofContext): {
|
|
56
|
+
addresses: Partial<Record<ProofChain, string>>;
|
|
57
|
+
proofs: Partial<Record<ProofChain, AddressProof>>;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Did the holder of `address` sign `message`? Boolean, never a throw: a malformed
|
|
61
|
+
* proof and a forged one are the same answer to the caller, which names its own
|
|
62
|
+
* refusal. The interesting failure is a VALID signature from the WRONG key, and
|
|
63
|
+
* the address-from-pubkey comparison is what catches it.
|
|
64
|
+
*/
|
|
65
|
+
export declare function verifyAddressProof(chain: ProofChain, address: string, proof: AddressProof | null | undefined, message: string): boolean;
|
|
66
|
+
//# sourceMappingURL=address-proof.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-proof.d.ts","sourceRoot":"","sources":["../src/address-proof.ts"],"names":[],"mappings":"AA2CA,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAA;AACjE,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAA2C,CAAA;AAQzF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAE3D;AAED,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAC3B,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAStG;AA8CD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,2BAA4B,CAAA;AACjD,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAmB9C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI9E;AAID;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,YAAY,CAgBxG;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,EAC9E,GAAG,EAAE,YAAY,GAChB;IAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAA;CAAE,CAUvG;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,EAAE,MAAM,GACd,OAAO,CA4CT"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// address-proof.ts — prove you hold the key behind an address before ONE records it.
|
|
2
|
+
// Import via the `@oneie/sdk/address-proof` subpath.
|
|
3
|
+
//
|
|
4
|
+
// WHY THIS EXISTS. `wallet:create` used to write any address an agent's key sent
|
|
5
|
+
// it — a string, checked for nothing but first-write-wins. An address is where
|
|
6
|
+
// every future payment to that agent lands, so an unproven one is a payout
|
|
7
|
+
// redirect waiting for a typo or a hostile caller. An AGENT registration now
|
|
8
|
+
// carries one signature per address over a statement that names the server's
|
|
9
|
+
// fresh challenge, the workspace, the actor, the chain and the address itself, so
|
|
10
|
+
// a signature cannot be lifted onto another address, actor or challenge.
|
|
11
|
+
//
|
|
12
|
+
// ONE FORMAT, BOTH SIDES. The CLI signs with `signAddressProof` and one.ie verifies
|
|
13
|
+
// with `verifyAddressProof` from this same file, so the statement cannot drift
|
|
14
|
+
// between the signer and the checker.
|
|
15
|
+
//
|
|
16
|
+
// PUBLIC BYTES ONLY CROSS THE WIRE. A proof is `{ publicKey, signature }`. The
|
|
17
|
+
// private key goes into `signAddressProof` and nothing it returns contains it.
|
|
18
|
+
//
|
|
19
|
+
// SMALL ON PURPOSE. This module imports curves and hashes and nothing else — no
|
|
20
|
+
// BIP-39 wordlist, no BIP-32 — because the one.ie worker loads it and its server
|
|
21
|
+
// bundle has a ceiling. The address math is therefore re-stated here rather than
|
|
22
|
+
// imported from `./wallet.js`; the round-trip test (keys from `generateWallet`,
|
|
23
|
+
// verified here) is what proves the two agree.
|
|
24
|
+
//
|
|
25
|
+
// Formats, mirroring pay.one.ie's agent_wallet_register:
|
|
26
|
+
// sui raw ed25519 over the statement; address = blake2b(0x00 || pubkey)
|
|
27
|
+
// solana raw ed25519 over the statement; the address IS the base58 pubkey
|
|
28
|
+
// evm EIP-191 personal_sign, 65-byte r||s||v; the signer is recovered
|
|
29
|
+
// btc secp256k1 over sha256(statement); P2WPKH from the compressed pubkey
|
|
30
|
+
// (not BIP-322 — the signer is this package, not a browser wallet)
|
|
31
|
+
// asi secp256k1 over sha256(statement), 64-byte compact low-S; the address
|
|
32
|
+
// is bech32(hrp, ripemd160(sha256(compressed pubkey))) with NO witness
|
|
33
|
+
// byte, recomputed under the address's own hrp — `fetch` or `asi` only
|
|
34
|
+
// (not ADR-036 — the signer is this package, not Keplr)
|
|
35
|
+
import { ed25519 } from '@noble/curves/ed25519.js';
|
|
36
|
+
import { secp256k1 } from '@noble/curves/secp256k1.js';
|
|
37
|
+
import { blake2b } from '@noble/hashes/blake2.js';
|
|
38
|
+
import { keccak_256 } from '@noble/hashes/sha3.js';
|
|
39
|
+
import { sha256 } from '@noble/hashes/sha2.js';
|
|
40
|
+
import { ripemd160 } from '@noble/hashes/legacy.js';
|
|
41
|
+
import { base58, bech32 } from '@scure/base';
|
|
42
|
+
export const PROOF_CHAINS = ['sui', 'evm', 'solana', 'btc', 'asi'];
|
|
43
|
+
/** The SDK keygen spells two chains differently (`sol`, and `eth` in places). */
|
|
44
|
+
const CHAIN_ALIASES = {
|
|
45
|
+
sui: 'sui', evm: 'evm', eth: 'evm', ethereum: 'evm',
|
|
46
|
+
sol: 'solana', solana: 'solana', btc: 'btc', bitcoin: 'btc',
|
|
47
|
+
asi: 'asi', fetch: 'asi',
|
|
48
|
+
};
|
|
49
|
+
export function proofChain(chain) {
|
|
50
|
+
return CHAIN_ALIASES[String(chain).toLowerCase()] ?? null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The exact bytes every address signs. Domain-separated by its first line so a
|
|
54
|
+
* registration signature is never a valid login or payment signature, and every
|
|
55
|
+
* field that makes it specific is inside it.
|
|
56
|
+
*/
|
|
57
|
+
export function addressProofMessage(ctx) {
|
|
58
|
+
return [
|
|
59
|
+
'ONE wallet registration',
|
|
60
|
+
`workspace: ${ctx.workspace}`,
|
|
61
|
+
`actor: ${ctx.actor}`,
|
|
62
|
+
`chain: ${ctx.chain}`,
|
|
63
|
+
`address: ${ctx.address}`,
|
|
64
|
+
`challenge: ${ctx.challenge}`,
|
|
65
|
+
].join('\n');
|
|
66
|
+
}
|
|
67
|
+
// ===== encoding =====
|
|
68
|
+
const enc = new TextEncoder();
|
|
69
|
+
function toHex(bytes) {
|
|
70
|
+
let s = '';
|
|
71
|
+
for (let i = 0; i < bytes.length; i++)
|
|
72
|
+
s += bytes[i].toString(16).padStart(2, '0');
|
|
73
|
+
return s;
|
|
74
|
+
}
|
|
75
|
+
function fromHex(hex) {
|
|
76
|
+
const h = hex.startsWith('0x') ? hex.slice(2) : hex;
|
|
77
|
+
if (h.length % 2 !== 0 || !/^[0-9a-fA-F]*$/.test(h))
|
|
78
|
+
throw new Error('not hex');
|
|
79
|
+
const out = new Uint8Array(h.length / 2);
|
|
80
|
+
for (let i = 0; i < out.length; i++)
|
|
81
|
+
out[i] = Number.parseInt(h.slice(i * 2, i * 2 + 2), 16);
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
84
|
+
function eip191Digest(message) {
|
|
85
|
+
const body = enc.encode(message);
|
|
86
|
+
const prefix = enc.encode(`\x19Ethereum Signed Message:\n${body.length}`);
|
|
87
|
+
const all = new Uint8Array(prefix.length + body.length);
|
|
88
|
+
all.set(prefix, 0);
|
|
89
|
+
all.set(body, prefix.length);
|
|
90
|
+
return keccak_256(all);
|
|
91
|
+
}
|
|
92
|
+
// ===== address from public key =====
|
|
93
|
+
function suiAddress(pub) {
|
|
94
|
+
const bytes = new Uint8Array(33);
|
|
95
|
+
bytes[0] = 0x00;
|
|
96
|
+
bytes.set(pub, 1);
|
|
97
|
+
return '0x' + toHex(blake2b(bytes, { dkLen: 32 }));
|
|
98
|
+
}
|
|
99
|
+
function evmAddress(uncompressed) {
|
|
100
|
+
return '0x' + toHex(keccak_256(uncompressed.slice(1)).slice(12));
|
|
101
|
+
}
|
|
102
|
+
function btcAddress(compressed) {
|
|
103
|
+
return bech32.encode('bc', [0, ...bech32.toWords(ripemd160(sha256(compressed)))]);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The prefixes an ASI address may carry. `fetch` is mainnet fetchhub-4, what ONE
|
|
107
|
+
* mints today; `asi` is the planned rename. Nothing else — a `cosmos1…` or any
|
|
108
|
+
* other hrp over the same 20 bytes is a different chain's address.
|
|
109
|
+
*/
|
|
110
|
+
export const ASI_HRPS = ['fetch', 'asi'];
|
|
111
|
+
const isAsiHrp = (hrp) => ASI_HRPS.includes(hrp);
|
|
112
|
+
function asiAddress(compressed, hrp) {
|
|
113
|
+
return bech32.encode(hrp, bech32.toWords(ripemd160(sha256(compressed))));
|
|
114
|
+
}
|
|
115
|
+
/** The 20-byte account id under an ASI address, or null when it is not one. */
|
|
116
|
+
function asiAccountBytes(address) {
|
|
117
|
+
try {
|
|
118
|
+
const { prefix, words } = bech32.decode(address.toLowerCase());
|
|
119
|
+
if (!isAsiHrp(prefix))
|
|
120
|
+
return null;
|
|
121
|
+
const bytes = bech32.fromWords(words);
|
|
122
|
+
return bytes.length === 20 ? { hrp: prefix, bytes } : null;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The same ASI account spelled under another prefix — bech32 decode, re-encode.
|
|
130
|
+
* The `wallets` columns are first-write-wins, so a `fetch1…` row is never
|
|
131
|
+
* rewritten when the chain renames to `asi`; it is SHOWN as `asi1…` through
|
|
132
|
+
* this. Pure. Null for anything that is not a 20-byte `fetch`/`asi` address, or
|
|
133
|
+
* a target prefix outside that pair — a refusal, never a mangled string.
|
|
134
|
+
*/
|
|
135
|
+
export function reencodeAsiAddress(address, hrp) {
|
|
136
|
+
if (typeof address !== 'string' || !isAsiHrp(hrp))
|
|
137
|
+
return null;
|
|
138
|
+
const parsed = asiAccountBytes(address);
|
|
139
|
+
return parsed ? bech32.encode(hrp, bech32.toWords(parsed.bytes)) : null;
|
|
140
|
+
}
|
|
141
|
+
// ===== sign (client side — the private key never leaves this function) =====
|
|
142
|
+
/**
|
|
143
|
+
* Sign one address's statement. `privateKeyHex` is the 32-byte secret from the
|
|
144
|
+
* local keygen (`WalletKey.privateKeyHex`); only public bytes come back.
|
|
145
|
+
*/
|
|
146
|
+
export function signAddressProof(chain, privateKeyHex, message) {
|
|
147
|
+
const secret = fromHex(privateKeyHex);
|
|
148
|
+
const msg = enc.encode(message);
|
|
149
|
+
if (chain === 'sui' || chain === 'solana') {
|
|
150
|
+
return { publicKey: toHex(ed25519.getPublicKey(secret)), signature: toHex(ed25519.sign(msg, secret)) };
|
|
151
|
+
}
|
|
152
|
+
if (chain === 'evm') {
|
|
153
|
+
const sig = secp256k1.sign(eip191Digest(message), secret, { prehash: false, format: 'recovered' });
|
|
154
|
+
// noble's recovered format is recovery||r||s; EIP-191 wants r||s||v with v = 27 + recovery.
|
|
155
|
+
const rsv = new Uint8Array(65);
|
|
156
|
+
rsv.set(sig.slice(1, 65), 0);
|
|
157
|
+
rsv[64] = sig[0] + 27;
|
|
158
|
+
return { publicKey: toHex(secp256k1.getPublicKey(secret, false)), signature: toHex(rsv) };
|
|
159
|
+
}
|
|
160
|
+
// btc and asi: noble hashes the statement with sha256 before signing (prehash).
|
|
161
|
+
return { publicKey: toHex(secp256k1.getPublicKey(secret, true)), signature: toHex(secp256k1.sign(msg, secret)) };
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Sign every address a local keygen produced, in one pass. Takes the keygen's
|
|
165
|
+
* `keys` array and returns `{ addresses, proofs }` built field by field from the
|
|
166
|
+
* known chains — a `mnemonic` or `privateKeyHex` on the input has no route
|
|
167
|
+
* into the result.
|
|
168
|
+
*/
|
|
169
|
+
export function proveAddresses(keys, ctx) {
|
|
170
|
+
const addresses = {};
|
|
171
|
+
const proofs = {};
|
|
172
|
+
for (const k of keys) {
|
|
173
|
+
const chain = proofChain(k.chain);
|
|
174
|
+
if (!chain || typeof k.address !== 'string' || !k.address || typeof k.privateKeyHex !== 'string')
|
|
175
|
+
continue;
|
|
176
|
+
addresses[chain] = k.address;
|
|
177
|
+
proofs[chain] = signAddressProof(chain, k.privateKeyHex, addressProofMessage({ ...ctx, chain, address: k.address }));
|
|
178
|
+
}
|
|
179
|
+
return { addresses, proofs };
|
|
180
|
+
}
|
|
181
|
+
// ===== verify (server side) =====
|
|
182
|
+
/**
|
|
183
|
+
* Did the holder of `address` sign `message`? Boolean, never a throw: a malformed
|
|
184
|
+
* proof and a forged one are the same answer to the caller, which names its own
|
|
185
|
+
* refusal. The interesting failure is a VALID signature from the WRONG key, and
|
|
186
|
+
* the address-from-pubkey comparison is what catches it.
|
|
187
|
+
*/
|
|
188
|
+
export function verifyAddressProof(chain, address, proof, message) {
|
|
189
|
+
try {
|
|
190
|
+
if (!proof || typeof proof.signature !== 'string' || !address)
|
|
191
|
+
return false;
|
|
192
|
+
const sig = fromHex(proof.signature);
|
|
193
|
+
const msg = enc.encode(message);
|
|
194
|
+
if (chain === 'sui') {
|
|
195
|
+
const pub = fromHex(String(proof.publicKey ?? ''));
|
|
196
|
+
if (pub.length !== 32)
|
|
197
|
+
return false;
|
|
198
|
+
if (suiAddress(pub) !== address.toLowerCase())
|
|
199
|
+
return false;
|
|
200
|
+
return ed25519.verify(sig, msg, pub);
|
|
201
|
+
}
|
|
202
|
+
if (chain === 'solana') {
|
|
203
|
+
const pub = base58.decode(address);
|
|
204
|
+
if (pub.length !== 32)
|
|
205
|
+
return false;
|
|
206
|
+
return ed25519.verify(sig, msg, pub);
|
|
207
|
+
}
|
|
208
|
+
if (chain === 'evm') {
|
|
209
|
+
if (sig.length !== 65)
|
|
210
|
+
return false;
|
|
211
|
+
const v = sig[64] >= 27 ? sig[64] - 27 : sig[64];
|
|
212
|
+
if (v !== 0 && v !== 1)
|
|
213
|
+
return false;
|
|
214
|
+
const recovered = new Uint8Array(65);
|
|
215
|
+
recovered[0] = v;
|
|
216
|
+
recovered.set(sig.slice(0, 64), 1);
|
|
217
|
+
const pub = secp256k1.recoverPublicKey(recovered, eip191Digest(message), { prehash: false });
|
|
218
|
+
const uncompressed = secp256k1.Point.fromBytes(pub).toBytes(false);
|
|
219
|
+
return evmAddress(uncompressed) === address.toLowerCase();
|
|
220
|
+
}
|
|
221
|
+
if (chain === 'btc') {
|
|
222
|
+
const pub = fromHex(String(proof.publicKey ?? ''));
|
|
223
|
+
if (pub.length !== 33)
|
|
224
|
+
return false;
|
|
225
|
+
if (btcAddress(pub) !== address.toLowerCase())
|
|
226
|
+
return false;
|
|
227
|
+
return secp256k1.verify(sig, msg, pub);
|
|
228
|
+
}
|
|
229
|
+
if (chain === 'asi') {
|
|
230
|
+
const pub = fromHex(String(proof.publicKey ?? ''));
|
|
231
|
+
if (pub.length !== 33)
|
|
232
|
+
return false;
|
|
233
|
+
const parsed = asiAccountBytes(address);
|
|
234
|
+
if (!parsed || asiAddress(pub, parsed.hrp) !== address.toLowerCase())
|
|
235
|
+
return false;
|
|
236
|
+
return secp256k1.verify(sig, msg, pub);
|
|
237
|
+
}
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
//# sourceMappingURL=address-proof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-proof.js","sourceRoot":"","sources":["../src/address-proof.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,qDAAqD;AACrD,EAAE;AACF,iFAAiF;AACjF,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,kFAAkF;AAClF,yEAAyE;AACzE,EAAE;AACF,oFAAoF;AACpF,+EAA+E;AAC/E,sCAAsC;AACtC,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,yDAAyD;AACzD,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;AAC7E,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,kEAAkE;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAI5C,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,CA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,EAAE,GAAG,CAAC,CAAA;QACxC,CAAC;QACD,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YACpB,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAA;YAClD,IAAI,GAAG,CAAC,MAAM,KAAK,EAAE;gBAAE,OAAO,KAAK,CAAA;YACnC,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;YACvC,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,WAAW,EAAE;gBAAE,OAAO,KAAK,CAAA;YAClF,OAAO,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;QACxC,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
package/dist/receivers.d.ts
CHANGED
|
@@ -950,9 +950,9 @@ export declare const RECEIVERS: {
|
|
|
950
950
|
authHeader: z.ZodOptional<z.ZodString>;
|
|
951
951
|
secret: z.ZodOptional<z.ZodString>;
|
|
952
952
|
returnMode: z.ZodOptional<z.ZodEnum<{
|
|
953
|
+
bytes: "bytes";
|
|
953
954
|
json: "json";
|
|
954
955
|
url: "url";
|
|
955
|
-
bytes: "bytes";
|
|
956
956
|
}>>;
|
|
957
957
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
958
958
|
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -986,9 +986,9 @@ export declare const RECEIVERS: {
|
|
|
986
986
|
endpoint: z.ZodString;
|
|
987
987
|
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
988
988
|
returnMode: z.ZodOptional<z.ZodEnum<{
|
|
989
|
+
bytes: "bytes";
|
|
989
990
|
json: "json";
|
|
990
991
|
url: "url";
|
|
991
|
-
bytes: "bytes";
|
|
992
992
|
}>>;
|
|
993
993
|
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
994
994
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1291,8 +1291,8 @@ export declare const RECEIVERS: {
|
|
|
1291
1291
|
"identity:attest": Receiver<z.ZodObject<{
|
|
1292
1292
|
subject: z.ZodString;
|
|
1293
1293
|
method: z.ZodEnum<{
|
|
1294
|
-
google: "google";
|
|
1295
1294
|
key: "key";
|
|
1295
|
+
google: "google";
|
|
1296
1296
|
phone: "phone";
|
|
1297
1297
|
passkey: "passkey";
|
|
1298
1298
|
domain: "domain";
|
|
@@ -3915,6 +3915,30 @@ export declare const RECEIVERS: {
|
|
|
3915
3915
|
evm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3916
3916
|
solana: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3917
3917
|
btc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3918
|
+
asi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3919
|
+
}, z.core.$strip>>;
|
|
3920
|
+
challenge: z.ZodOptional<z.ZodString>;
|
|
3921
|
+
proofs: z.ZodOptional<z.ZodObject<{
|
|
3922
|
+
sui: z.ZodOptional<z.ZodObject<{
|
|
3923
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
3924
|
+
signature: z.ZodString;
|
|
3925
|
+
}, z.core.$strip>>;
|
|
3926
|
+
evm: z.ZodOptional<z.ZodObject<{
|
|
3927
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
3928
|
+
signature: z.ZodString;
|
|
3929
|
+
}, z.core.$strip>>;
|
|
3930
|
+
solana: z.ZodOptional<z.ZodObject<{
|
|
3931
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
3932
|
+
signature: z.ZodString;
|
|
3933
|
+
}, z.core.$strip>>;
|
|
3934
|
+
btc: z.ZodOptional<z.ZodObject<{
|
|
3935
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
3936
|
+
signature: z.ZodString;
|
|
3937
|
+
}, z.core.$strip>>;
|
|
3938
|
+
asi: z.ZodOptional<z.ZodObject<{
|
|
3939
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
3940
|
+
signature: z.ZodString;
|
|
3941
|
+
}, z.core.$strip>>;
|
|
3918
3942
|
}, z.core.$strip>>;
|
|
3919
3943
|
}, z.core.$strip>, z.ZodObject<{
|
|
3920
3944
|
ok: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3926,10 +3950,22 @@ export declare const RECEIVERS: {
|
|
|
3926
3950
|
evm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3927
3951
|
solana: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3928
3952
|
btc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3953
|
+
asi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3929
3954
|
}, z.core.$strip>>;
|
|
3930
3955
|
error: z.ZodOptional<z.ZodString>;
|
|
3931
3956
|
field: z.ZodOptional<z.ZodString>;
|
|
3932
3957
|
}, z.core.$strip>>;
|
|
3958
|
+
"wallet:challenge": Receiver<z.ZodObject<{
|
|
3959
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
3960
|
+
actor: z.ZodOptional<z.ZodString>;
|
|
3961
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3962
|
+
ok: z.ZodOptional<z.ZodBoolean>;
|
|
3963
|
+
challenge: z.ZodOptional<z.ZodString>;
|
|
3964
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
3965
|
+
actor: z.ZodOptional<z.ZodString>;
|
|
3966
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
3967
|
+
error: z.ZodOptional<z.ZodString>;
|
|
3968
|
+
}, z.core.$strip>>;
|
|
3933
3969
|
"wallet:rehearse": Receiver<z.ZodObject<{
|
|
3934
3970
|
chain: z.ZodLiteral<"sui">;
|
|
3935
3971
|
network: z.ZodLiteral<"testnet">;
|
|
@@ -5204,8 +5240,8 @@ export declare const RECEIVERS: {
|
|
|
5204
5240
|
}, z.core.$strip>;
|
|
5205
5241
|
details: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
5206
5242
|
paymentRail: z.ZodOptional<z.ZodEnum<{
|
|
5207
|
-
stripe: "stripe";
|
|
5208
5243
|
sui: "sui";
|
|
5244
|
+
stripe: "stripe";
|
|
5209
5245
|
}>>;
|
|
5210
5246
|
}, z.core.$strip>, z.ZodObject<{
|
|
5211
5247
|
ok: z.ZodBoolean;
|
|
@@ -5215,8 +5251,8 @@ export declare const RECEIVERS: {
|
|
|
5215
5251
|
confirmed: "confirmed";
|
|
5216
5252
|
}>>;
|
|
5217
5253
|
paymentRail: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
5218
|
-
stripe: "stripe";
|
|
5219
5254
|
sui: "sui";
|
|
5255
|
+
stripe: "stripe";
|
|
5220
5256
|
}>>>;
|
|
5221
5257
|
paymentIntent: z.ZodOptional<z.ZodObject<{
|
|
5222
5258
|
clientSecret: z.ZodString;
|
package/dist/receivers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receivers.d.ts","sourceRoot":"","sources":["../src/receivers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,8EAA8E;AAC9E,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,+DAA+D;AAC/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,oD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;;IAExD,iEAAiE;;IAEjE,mDAAmD;;IAEnD,8DAA8D;;IAE9D,wFAAwF;;CAEvC,CAAC;AAEpD,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC"}
|
package/dist/receivers.js
CHANGED
|
@@ -138,9 +138,10 @@ export const RECEIVERS = {
|
|
|
138
138
|
receiver: "auth:agent",
|
|
139
139
|
canonical: "agent:enroll",
|
|
140
140
|
// `wallet` is a PUBLIC receiving address the caller derived in its own process.
|
|
141
|
-
// Nothing here generates keys
|
|
142
|
-
//
|
|
143
|
-
|
|
141
|
+
// Nothing here generates keys. The address is stored on the TypeDB actor but NOT
|
|
142
|
+
// on the wallets row: an agent address needs a wallet:challenge proof, so the
|
|
143
|
+
// row is a shell until the agent registers by signature through wallet:create.
|
|
144
|
+
summary: "Become an actor — mint a uid and a scoped API key, and register an empty wallets row; addresses are registered afterwards by wallet:challenge proof",
|
|
144
145
|
request: () => z.object({ name: z.string().optional(), uid: z.string().optional(), kind: z.string().optional(), wallet: z.string().optional() }),
|
|
145
146
|
response: () => z.object({
|
|
146
147
|
uid: z.string(), name: z.string(), kind: z.string(),
|
|
@@ -4804,6 +4805,20 @@ export const RECEIVERS = {
|
|
|
4804
4805
|
evm: z.string().nullable().optional(),
|
|
4805
4806
|
solana: z.string().nullable().optional(),
|
|
4806
4807
|
btc: z.string().nullable().optional(),
|
|
4808
|
+
// ASI (Fetch.ai) — bech32 `fetch1…` today; stored as sent, shown as `asi1…`
|
|
4809
|
+
// after the rename via reencodeAsiAddress (@oneie/sdk/address-proof).
|
|
4810
|
+
asi: z.string().nullable().optional(),
|
|
4811
|
+
}).optional(),
|
|
4812
|
+
// An AGENT's addresses are written only with proof of control: the token
|
|
4813
|
+
// wallet:challenge issued, and one signature per address over
|
|
4814
|
+
// addressProofMessage (@oneie/sdk/address-proof). Public bytes only.
|
|
4815
|
+
challenge: z.string().optional(),
|
|
4816
|
+
proofs: z.object({
|
|
4817
|
+
sui: z.object({ publicKey: z.string().optional(), signature: z.string() }).optional(),
|
|
4818
|
+
evm: z.object({ publicKey: z.string().optional(), signature: z.string() }).optional(),
|
|
4819
|
+
solana: z.object({ publicKey: z.string().optional(), signature: z.string() }).optional(),
|
|
4820
|
+
btc: z.object({ publicKey: z.string().optional(), signature: z.string() }).optional(),
|
|
4821
|
+
asi: z.object({ publicKey: z.string().optional(), signature: z.string() }).optional(),
|
|
4807
4822
|
}).optional(),
|
|
4808
4823
|
}),
|
|
4809
4824
|
response: () => z.object({
|
|
@@ -4816,6 +4831,7 @@ export const RECEIVERS = {
|
|
|
4816
4831
|
evm: z.string().nullable().optional(),
|
|
4817
4832
|
solana: z.string().nullable().optional(),
|
|
4818
4833
|
btc: z.string().nullable().optional(),
|
|
4834
|
+
asi: z.string().nullable().optional(),
|
|
4819
4835
|
}).optional(),
|
|
4820
4836
|
error: z.string().optional(),
|
|
4821
4837
|
field: z.string().optional(),
|
|
@@ -4823,6 +4839,24 @@ export const RECEIVERS = {
|
|
|
4823
4839
|
effect: "ask", cost: "free", reversible: false, idempotent: true, settles: "none", auth: "member",
|
|
4824
4840
|
examples: [{ workspace: "acme", kind: "human", addresses: { sui: "0xabc", evm: "0xdef" } }],
|
|
4825
4841
|
}),
|
|
4842
|
+
"wallet:challenge": receiver({
|
|
4843
|
+
receiver: "wallet:challenge",
|
|
4844
|
+
summary: "Issue a fresh, single-use challenge an agent signs to prove it holds the keys behind the addresses it registers with wallet:create",
|
|
4845
|
+
request: () => z.object({
|
|
4846
|
+
workspace: z.string().optional(),
|
|
4847
|
+
actor: z.string().optional(),
|
|
4848
|
+
}),
|
|
4849
|
+
response: () => z.object({
|
|
4850
|
+
ok: z.boolean().optional(),
|
|
4851
|
+
challenge: z.string().optional(),
|
|
4852
|
+
workspace: z.string().optional(),
|
|
4853
|
+
actor: z.string().optional(),
|
|
4854
|
+
expiresAt: z.number().optional(),
|
|
4855
|
+
error: z.string().optional(),
|
|
4856
|
+
}),
|
|
4857
|
+
effect: "ask", cost: "free", reversible: true, idempotent: false, settles: "none", auth: "member",
|
|
4858
|
+
examples: [{ workspace: "acme", actor: "acme" }],
|
|
4859
|
+
}),
|
|
4826
4860
|
// ── wallet:rehearse — READ a TESTNET transaction back (handler: resolvers/wallet.ts) ──
|
|
4827
4861
|
// The rehearsal step of the /u/one funnel: a visitor sends play money on Sui
|
|
4828
4862
|
// testnet from their own derived address, and this reads the digest back so the
|