@vapi-network/core 0.5.0 → 0.8.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/README.md +406 -5
- package/dist/account-add.d.ts +101 -0
- package/dist/account-add.d.ts.map +1 -0
- package/dist/account-movement-lock.d.ts +10 -0
- package/dist/account-movement-lock.d.ts.map +1 -0
- package/dist/agent-link.d.ts +16 -1
- package/dist/agent-link.d.ts.map +1 -1
- package/dist/agent-link.js +131 -54
- package/dist/agent-link.js.map +3 -3
- package/dist/agent-profile.d.ts +47 -6
- package/dist/agent-profile.d.ts.map +1 -1
- package/dist/agent-run.d.ts +12 -0
- package/dist/agent-run.d.ts.map +1 -0
- package/dist/allocation.d.ts +64 -0
- package/dist/allocation.d.ts.map +1 -0
- package/dist/api-key.js +4 -2
- package/dist/api-key.js.map +1 -1
- package/dist/atomic-file.d.ts +23 -0
- package/dist/atomic-file.d.ts.map +1 -0
- package/dist/audit.d.ts +4 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/backup.d.ts +307 -0
- package/dist/backup.d.ts.map +1 -0
- package/dist/backup.js +49938 -0
- package/dist/backup.js.map +6 -0
- package/dist/call-contracts-wire.d.ts +12 -12
- package/dist/ceiling.d.ts +98 -0
- package/dist/ceiling.d.ts.map +1 -0
- package/dist/cloud-backup.d.ts +123 -0
- package/dist/cloud-backup.d.ts.map +1 -0
- package/dist/cloud-backup.js +50827 -0
- package/dist/cloud-backup.js.map +6 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/device.d.ts +15 -0
- package/dist/device.d.ts.map +1 -0
- package/dist/distribute.d.ts +68 -0
- package/dist/distribute.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10131 -1228
- package/dist/index.js.map +3 -3
- package/dist/keystore.d.ts +24 -1
- package/dist/keystore.d.ts.map +1 -1
- package/dist/marketplace-contracts.d.ts +14 -14
- package/dist/member-bundle.d.ts +110 -0
- package/dist/member-bundle.d.ts.map +1 -0
- package/dist/movement-open.d.ts +10 -0
- package/dist/movement-open.d.ts.map +1 -0
- package/dist/movement.d.ts +172 -0
- package/dist/movement.d.ts.map +1 -0
- package/dist/networks.d.ts +1 -0
- package/dist/networks.d.ts.map +1 -1
- package/dist/receipts.d.ts +33 -0
- package/dist/receipts.d.ts.map +1 -1
- package/dist/router-client.d.ts +9 -1
- package/dist/router-client.d.ts.map +1 -1
- package/dist/router-client.js +36500 -16308
- package/dist/router-client.js.map +3 -3
- package/dist/run-budget.d.ts +17 -0
- package/dist/run-budget.d.ts.map +1 -0
- package/dist/secret-store.d.ts +23 -5
- package/dist/secret-store.d.ts.map +1 -1
- package/dist/secrets.d.ts +2 -0
- package/dist/secrets.d.ts.map +1 -1
- package/dist/secrets.js +1439 -56
- package/dist/secrets.js.map +3 -3
- package/dist/siblings.d.ts +41 -0
- package/dist/siblings.d.ts.map +1 -0
- package/dist/spend-policy.d.ts +12 -0
- package/dist/spend-policy.d.ts.map +1 -1
- package/dist/status.d.ts +73 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/support-report.d.ts +1 -1
- package/dist/swarm-capital.d.ts +147 -0
- package/dist/swarm-capital.d.ts.map +1 -0
- package/dist/swarm.d.ts +224 -0
- package/dist/swarm.d.ts.map +1 -0
- package/dist/transfer-journal.d.ts +11 -0
- package/dist/transfer-journal.d.ts.map +1 -0
- package/dist/transfer.d.ts +65 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/vault-key.d.ts +41 -0
- package/dist/vault-key.d.ts.map +1 -0
- package/dist/vault-migrate.d.ts +29 -0
- package/dist/vault-migrate.d.ts.map +1 -0
- package/dist/vault.d.ts +104 -0
- package/dist/vault.d.ts.map +1 -0
- package/dist/wallet-store.d.ts +135 -39
- package/dist/wallet-store.d.ts.map +1 -1
- package/dist/x402-pay.d.ts +12 -0
- package/dist/x402-pay.d.ts.map +1 -1
- package/dist/x402.d.ts +3 -0
- package/dist/x402.d.ts.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RunBudget = {
|
|
2
|
+
id: string;
|
|
3
|
+
limitAtomic: bigint;
|
|
4
|
+
spentAtomic(): bigint;
|
|
5
|
+
reservedAtomic(reservationId: string): bigint;
|
|
6
|
+
reserve(amountAtomic: bigint, reservationId: string): void;
|
|
7
|
+
release(reservationId: string): void;
|
|
8
|
+
};
|
|
9
|
+
export declare class RunBudgetError extends Error {
|
|
10
|
+
readonly name = "RunBudgetError";
|
|
11
|
+
readonly code = "run_budget_exceeded";
|
|
12
|
+
}
|
|
13
|
+
export declare function createRunBudget(args: {
|
|
14
|
+
limitAtomic: bigint;
|
|
15
|
+
id: string;
|
|
16
|
+
}): RunBudget;
|
|
17
|
+
//# sourceMappingURL=run-budget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-budget.d.ts","sourceRoot":"","sources":["../src/run-budget.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,IAAI,MAAM,CAAC;IACtB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9C,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC,CAAC;AAEF,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,IAAI,yBAAyB;CACvC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA+BpF"}
|
package/dist/secret-store.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* The OS secret store, so an agent never needs a passphrase in plain text.
|
|
3
3
|
*
|
|
4
4
|
* A wallet's passphrase is kept by the operating system's own credential
|
|
5
|
-
* store — the macOS Keychain, or libsecret on Linux —
|
|
6
|
-
* `vapi-network` and the wallet's name as the account.
|
|
7
|
-
* there,
|
|
8
|
-
* before falling back to a prompt.
|
|
5
|
+
* store — the macOS Keychain, Windows Data Protection, or libsecret on Linux —
|
|
6
|
+
* under the service `vapi-network` and the wallet's name as the account. The
|
|
7
|
+
* unlock command puts it there, the lock command takes it out, and every unlock
|
|
8
|
+
* path reads it from there before falling back to a prompt.
|
|
9
9
|
*
|
|
10
10
|
* There is no dependency: the store is driven through the OS binaries with
|
|
11
|
-
* `
|
|
11
|
+
* `spawn` and an argument array, never a shell string, so nothing a wallet
|
|
12
12
|
* name or a passphrase contains can be read as a command. The passphrase
|
|
13
13
|
* itself is written to the binary's stdin and never appears in an argument,
|
|
14
14
|
* where `ps` would show it to every process on the machine.
|
|
@@ -54,7 +54,25 @@ export type SecretStoreOptions = {
|
|
|
54
54
|
platform?: NodeJS.Platform | undefined;
|
|
55
55
|
/** Defaults to running the real binary. */
|
|
56
56
|
run?: SecretStoreRunner | undefined;
|
|
57
|
+
/** Defaults to `process.env`; the Windows store reads `SystemRoot` and the PATH scan reads `PATH` from it. */
|
|
58
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
59
|
+
/** Whether a binary is on this machine; decides `available`. Defaults to an `existsSync` / PATH scan. */
|
|
60
|
+
installed?: ((file: string) => boolean) | undefined;
|
|
57
61
|
};
|
|
58
62
|
/** The secret store of this machine, or one that refuses on every call. */
|
|
59
63
|
export declare function secretStore(options?: SecretStoreOptions): SecretStore;
|
|
64
|
+
/**
|
|
65
|
+
* A secret store held in a `Map`, for tests and for a process that is handed
|
|
66
|
+
* its credentials rather than reading them from the OS. It never runs a
|
|
67
|
+
* binary and forgets everything when the process ends.
|
|
68
|
+
*/
|
|
69
|
+
export declare function memorySecretStore(initial?: Record<string, string>): SecretStore;
|
|
70
|
+
/**
|
|
71
|
+
* Maps an account to its Windows secret filename without case-insensitive
|
|
72
|
+
* collisions. Only `[a-z0-9._#-]` is emitted verbatim; every other UTF-16 code
|
|
73
|
+
* unit becomes an uppercase `%XXXX` escape. Encoding code units also keeps
|
|
74
|
+
* malformed Unicode strings distinct. The resulting alphabet is safe to embed
|
|
75
|
+
* in a single-quoted PowerShell literal.
|
|
76
|
+
*/
|
|
77
|
+
export declare function windowsSecretFileName(account: string): string;
|
|
60
78
|
//# sourceMappingURL=secret-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-store.d.ts","sourceRoot":"","sources":["../src/secret-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secret-store.d.ts","sourceRoot":"","sources":["../src/secret-store.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AAEH,wDAAwD;AACxD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAyBnD,wFAAwF;AACxF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,CAAC,EAAE,MAAM,KACX,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,MAAM,MAAM,WAAW,GAAG;IACxB,+DAA+D;IAC/D,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,4EAA4E;IAC5E,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,iEAAiE;IACjE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC;;;;OAIG;IACH,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;IACvC,2CAA2C;IAC3C,GAAG,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACpC,8GAA8G;IAC9G,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;IACpC,yGAAyG;IACzG,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,CASzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,WAAW,CAsBnF;AAoJD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAc7D"}
|
package/dist/secrets.d.ts
CHANGED
|
@@ -11,4 +11,6 @@
|
|
|
11
11
|
* nowhere else: not to a log, not to a file, not into a tool result.
|
|
12
12
|
*/
|
|
13
13
|
export { createKeystoreWithPhrase, decryptPrivateKey, exportKeystoreKeys, exportRecoveryPhrase, type ExportedVapiKeys, } from "./keystore.js";
|
|
14
|
+
export { exportMemberKey, exportVaultAccountKey, exportVaultPhrase } from "./vault.js";
|
|
15
|
+
export { createMemberBundle, headlessConfigFromBundle, MEMBER_BUNDLE_MAX_BYTES, MemberBundleError, memberBundleConfig, memberBundleConfigSchema, memberBundleSchema, openMemberBundle, readMemberCredentials, type MemberBundle, type MemberBundleConfig, type MemberBundleErrorCode, type MemberBundleNetwork, type MemberCredentials, } from "./member-bundle.js";
|
|
14
16
|
//# sourceMappingURL=secrets.d.ts.map
|
package/dist/secrets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvF,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,oBAAoB,CAAC"}
|