@intent-engine/cli 0.1.23 → 0.1.26
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/src/admin-commands.d.ts +12 -0
- package/dist/src/admin-commands.js +140 -0
- package/dist/src/admin-commands.js.map +1 -0
- package/dist/src/agent/actions.d.ts +2 -0
- package/dist/src/agent/actions.js +1 -1
- package/dist/src/agent/actions.js.map +1 -1
- package/dist/src/agent/claims.js +13 -12
- package/dist/src/agent/claims.js.map +1 -1
- package/dist/src/agent/create.d.ts +1 -0
- package/dist/src/agent/create.js +7 -3
- package/dist/src/agent/create.js.map +1 -1
- package/dist/src/agent/mandate-agent.d.ts +2 -0
- package/dist/src/agent/mandate-agent.js +136 -0
- package/dist/src/agent/mandate-agent.js.map +1 -0
- package/dist/src/agent/mandate-grant.d.ts +2 -0
- package/dist/src/agent/mandate-grant.js +192 -0
- package/dist/src/agent/mandate-grant.js.map +1 -0
- package/dist/src/agent/mandate-revoke.d.ts +1 -0
- package/dist/src/agent/mandate-revoke.js +142 -0
- package/dist/src/agent/mandate-revoke.js.map +1 -0
- package/dist/src/agent/mandate-state.d.ts +33 -0
- package/dist/src/agent/mandate-state.js +85 -0
- package/dist/src/agent/mandate-state.js.map +1 -0
- package/dist/src/agent/mandate.d.ts +4 -26
- package/dist/src/agent/mandate.js +4 -479
- package/dist/src/agent/mandate.js.map +1 -1
- package/dist/src/agent/mcp.js +7 -3
- package/dist/src/agent/mcp.js.map +1 -1
- package/dist/src/agent/prepare.js +1 -1
- package/dist/src/agent/prepare.js.map +1 -1
- package/dist/src/agent/problems.d.ts +13 -1
- package/dist/src/agent/problems.js +32 -1
- package/dist/src/agent/problems.js.map +1 -1
- package/dist/src/agent/read.d.ts +12 -0
- package/dist/src/agent/read.js +20 -6
- package/dist/src/agent/read.js.map +1 -1
- package/dist/src/agent/registry.js +6 -1
- package/dist/src/agent/registry.js.map +1 -1
- package/dist/src/agent/relay.d.ts +2 -0
- package/dist/src/agent/relay.js +11 -3
- package/dist/src/agent/relay.js.map +1 -1
- package/dist/src/agent/sales.d.ts +29 -0
- package/dist/src/agent/sales.js +248 -0
- package/dist/src/agent/sales.js.map +1 -0
- package/dist/src/agent/signed-prepare.d.ts +1 -0
- package/dist/src/agent/signed-prepare.js +141 -0
- package/dist/src/agent/signed-prepare.js.map +1 -0
- package/dist/src/agent/signed-relay.d.ts +25 -0
- package/dist/src/agent/signed-relay.js +68 -0
- package/dist/src/agent/signed-relay.js.map +1 -0
- package/dist/src/agent/signed-submit.d.ts +2 -0
- package/dist/src/agent/signed-submit.js +137 -0
- package/dist/src/agent/signed-submit.js.map +1 -0
- package/dist/src/agent/signed-terms.d.ts +85 -0
- package/dist/src/agent/signed-terms.js +84 -0
- package/dist/src/agent/signed-terms.js.map +1 -0
- package/dist/src/agent/signed.d.ts +4 -13
- package/dist/src/agent/signed.js +4 -361
- package/dist/src/agent/signed.js.map +1 -1
- package/dist/src/agent/wallet/account.d.ts +4 -0
- package/dist/src/agent/wallet/account.js +84 -0
- package/dist/src/agent/wallet/account.js.map +1 -0
- package/dist/src/agent/wallet/attest.d.ts +4 -0
- package/dist/src/agent/wallet/attest.js +178 -0
- package/dist/src/agent/wallet/attest.js.map +1 -0
- package/dist/src/agent/wallet/delivery.d.ts +13 -0
- package/dist/src/agent/wallet/delivery.js +171 -0
- package/dist/src/agent/wallet/delivery.js.map +1 -0
- package/dist/src/agent/wallet/escrow.d.ts +7 -0
- package/dist/src/agent/wallet/escrow.js +164 -0
- package/dist/src/agent/wallet/escrow.js.map +1 -0
- package/dist/src/agent/wallet/fills.d.ts +27 -0
- package/dist/src/agent/wallet/fills.js +80 -0
- package/dist/src/agent/wallet/fills.js.map +1 -0
- package/dist/src/agent/wallet/guard.d.ts +57 -0
- package/dist/src/agent/wallet/guard.js +205 -0
- package/dist/src/agent/wallet/guard.js.map +1 -0
- package/dist/src/agent/wallet/offer.d.ts +50 -0
- package/dist/src/agent/wallet/offer.js +80 -0
- package/dist/src/agent/wallet/offer.js.map +1 -0
- package/dist/src/agent/wallet/receipt.d.ts +42 -0
- package/dist/src/agent/wallet/receipt.js +102 -0
- package/dist/src/agent/wallet/receipt.js.map +1 -0
- package/dist/src/agent/wallet/record.d.ts +31 -0
- package/dist/src/agent/wallet/record.js +178 -0
- package/dist/src/agent/wallet/record.js.map +1 -0
- package/dist/src/agent/wallet/releases.d.ts +40 -0
- package/dist/src/agent/wallet/releases.js +236 -0
- package/dist/src/agent/wallet/releases.js.map +1 -0
- package/dist/src/agent/wallet/split.d.ts +10 -0
- package/dist/src/agent/wallet/split.js +271 -0
- package/dist/src/agent/wallet/split.js.map +1 -0
- package/dist/src/agent/wallet/trade.d.ts +14 -0
- package/dist/src/agent/wallet/trade.js +243 -0
- package/dist/src/agent/wallet/trade.js.map +1 -0
- package/dist/src/agent/wallet/wait.d.ts +5 -0
- package/dist/src/agent/wallet/wait.js +99 -0
- package/dist/src/agent/wallet/wait.js.map +1 -0
- package/dist/src/agent/wallet.d.ts +18 -73
- package/dist/src/agent/wallet.js +24 -1322
- package/dist/src/agent/wallet.js.map +1 -1
- package/dist/src/arg-options.d.ts +333 -0
- package/dist/src/arg-options.js +310 -0
- package/dist/src/arg-options.js.map +1 -0
- package/dist/src/arg-usage.d.ts +7 -0
- package/dist/src/arg-usage.js +53 -0
- package/dist/src/arg-usage.js.map +1 -0
- package/dist/src/arg-values.d.ts +47 -0
- package/dist/src/arg-values.js +280 -0
- package/dist/src/arg-values.js.map +1 -0
- package/dist/src/args.d.ts +7 -545
- package/dist/src/args.js +55 -923
- package/dist/src/args.js.map +1 -1
- package/dist/src/artifact.d.ts +22 -0
- package/dist/src/artifact.js +89 -0
- package/dist/src/artifact.js.map +1 -0
- package/dist/src/check-process.d.ts +39 -0
- package/dist/src/check-process.js +338 -0
- package/dist/src/check-process.js.map +1 -0
- package/dist/src/command-builders.d.ts +37 -0
- package/dist/src/command-builders.js +216 -0
- package/dist/src/command-builders.js.map +1 -0
- package/dist/src/command-types.d.ts +227 -0
- package/dist/src/command-types.js +2 -0
- package/dist/src/command-types.js.map +1 -0
- package/dist/src/commands.d.ts +7 -43
- package/dist/src/commands.js +60 -457
- package/dist/src/commands.js.map +1 -1
- package/dist/src/event-feed.d.ts +13 -0
- package/dist/src/event-feed.js +46 -0
- package/dist/src/event-feed.js.map +1 -0
- package/dist/src/flow-commands.d.ts +8 -0
- package/dist/src/flow-commands.js +116 -0
- package/dist/src/flow-commands.js.map +1 -0
- package/dist/src/flows.d.ts +6 -0
- package/dist/src/flows.js +84 -10
- package/dist/src/flows.js.map +1 -1
- package/dist/src/job-commands.d.ts +9 -0
- package/dist/src/job-commands.js +89 -0
- package/dist/src/job-commands.js.map +1 -0
- package/dist/src/judge-errors.d.ts +12 -0
- package/dist/src/judge-errors.js +16 -0
- package/dist/src/judge-errors.js.map +1 -0
- package/dist/src/judge.d.ts +11 -16
- package/dist/src/judge.js +120 -100
- package/dist/src/judge.js.map +1 -1
- package/dist/src/main.d.ts +4 -1
- package/dist/src/main.js +25 -9
- package/dist/src/main.js.map +1 -1
- package/dist/src/order-builders.d.ts +10 -0
- package/dist/src/order-builders.js +172 -0
- package/dist/src/order-builders.js.map +1 -0
- package/dist/src/render.d.ts +1 -0
- package/dist/src/render.js +9 -0
- package/dist/src/render.js.map +1 -1
- package/dist/src/runtime.d.ts +22 -0
- package/dist/src/runtime.js +2 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/solve-commands.d.ts +25 -0
- package/dist/src/solve-commands.js +171 -0
- package/dist/src/solve-commands.js.map +1 -0
- package/dist/src/tokens.js +2 -1
- package/dist/src/tokens.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/wallet.d.ts +4 -1
- package/dist/src/wallet.js +25 -5
- package/dist/src/wallet.js.map +1 -1
- package/package.json +16 -7
- package/dist/src/events.d.ts +0 -8
- package/dist/src/events.js +0 -43
- package/dist/src/events.js.map +0 -1
- package/dist/src/transport.d.ts +0 -208
- package/dist/src/transport.js +0 -441
- package/dist/src/transport.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intent-engine/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Command line and MCP server for the intent engine on Solana",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/MerlijnW70/solive.git",
|
|
9
|
+
"directory": "packages/cli"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/MerlijnW70/solive#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/MerlijnW70/solive/issues"
|
|
14
|
+
},
|
|
6
15
|
"type": "module",
|
|
7
16
|
"files": [
|
|
8
17
|
"dist/src"
|
|
@@ -20,10 +29,10 @@
|
|
|
20
29
|
"@modelcontextprotocol/server": "2.3.1",
|
|
21
30
|
"@solana-program/system": "0.14.1",
|
|
22
31
|
"@solana-program/token": "0.16.1",
|
|
23
|
-
"@solana/kit": "8.4.0",
|
|
24
|
-
"@intent-engine/
|
|
25
|
-
"@intent-engine/
|
|
26
|
-
"@intent-engine/
|
|
32
|
+
"@solana/kit": "^8.4.0",
|
|
33
|
+
"@intent-engine/solver": "0.1.26",
|
|
34
|
+
"@intent-engine/core": "0.1.26",
|
|
35
|
+
"@intent-engine/client": "0.1.26"
|
|
27
36
|
},
|
|
28
37
|
"devDependencies": {
|
|
29
38
|
"@modelcontextprotocol/client": "2.3.1",
|
|
@@ -34,8 +43,8 @@
|
|
|
34
43
|
"vitest": "5.0.3"
|
|
35
44
|
},
|
|
36
45
|
"scripts": {
|
|
37
|
-
"build": "tsc -p tsconfig.build.json",
|
|
46
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|
|
38
47
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
39
|
-
"test": "vitest run --fsModuleCache"
|
|
48
|
+
"test": "vitest run --fsModuleCache --testTimeout=30000"
|
|
40
49
|
}
|
|
41
50
|
}
|
package/dist/src/events.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const EVENT_IX_TAG: Uint8Array<ArrayBuffer>;
|
|
2
|
-
export declare const NOTABLE: Set<string>;
|
|
3
|
-
export type DecodedEvent = {
|
|
4
|
-
name: string;
|
|
5
|
-
notable: boolean;
|
|
6
|
-
fields: object;
|
|
7
|
-
};
|
|
8
|
-
export declare function decodeEvent(data: Uint8Array): DecodedEvent | null;
|
package/dist/src/events.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { IntentEngineEvent, identifyIntentEngineEvent, parseAdminAcceptedEvent, parseAdminProposedEvent, parseConfigInitializedEvent, parseConfigUpdatedEvent, parseFillBegunEvent, parseFillEndedEvent, parseIntentAttestedEvent, parseIntentCancelledEvent, parseIntentClosedEvent, parseIntentCreatedEvent, parseIntentExpiredEvent, parseIntentFilledEvent, parseNonceAdvancedEvent, parsePauseLoweredEvent, parsePauseRaisedEvent, parseUserInitializedEvent, } from "@intent-engine/core";
|
|
2
|
-
export const EVENT_IX_TAG = new Uint8Array([0xe4, 0xa5, 0x45, 0xea, 0x51, 0xcb, 0x9a, 0x1d]);
|
|
3
|
-
const PARSERS = {
|
|
4
|
-
AdminAccepted: parseAdminAcceptedEvent,
|
|
5
|
-
AdminProposed: parseAdminProposedEvent,
|
|
6
|
-
ConfigInitialized: parseConfigInitializedEvent,
|
|
7
|
-
ConfigUpdated: parseConfigUpdatedEvent,
|
|
8
|
-
FillBegun: parseFillBegunEvent,
|
|
9
|
-
FillEnded: parseFillEndedEvent,
|
|
10
|
-
IntentAttested: parseIntentAttestedEvent,
|
|
11
|
-
IntentCancelled: parseIntentCancelledEvent,
|
|
12
|
-
IntentClosed: parseIntentClosedEvent,
|
|
13
|
-
IntentCreated: parseIntentCreatedEvent,
|
|
14
|
-
IntentExpired: parseIntentExpiredEvent,
|
|
15
|
-
IntentFilled: parseIntentFilledEvent,
|
|
16
|
-
NonceAdvanced: parseNonceAdvancedEvent,
|
|
17
|
-
PauseLowered: parsePauseLoweredEvent,
|
|
18
|
-
PauseRaised: parsePauseRaisedEvent,
|
|
19
|
-
UserInitialized: parseUserInitializedEvent,
|
|
20
|
-
};
|
|
21
|
-
export const NOTABLE = new Set([
|
|
22
|
-
"AdminAccepted",
|
|
23
|
-
"AdminProposed",
|
|
24
|
-
"ConfigInitialized",
|
|
25
|
-
"ConfigUpdated",
|
|
26
|
-
"PauseLowered",
|
|
27
|
-
"PauseRaised",
|
|
28
|
-
]);
|
|
29
|
-
export function decodeEvent(data) {
|
|
30
|
-
if (data.length < EVENT_IX_TAG.length || !EVENT_IX_TAG.every((b, i) => data[i] === b)) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const body = data.subarray(EVENT_IX_TAG.length);
|
|
34
|
-
let name;
|
|
35
|
-
try {
|
|
36
|
-
name = IntentEngineEvent[identifyIntentEngineEvent(body)];
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return { name, notable: NOTABLE.has(name), fields: PARSERS[name](body) };
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=events.js.map
|
package/dist/src/events.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAI7F,MAAM,OAAO,GAAoD;IAC/D,aAAa,EAAE,uBAAuB;IACtC,aAAa,EAAE,uBAAuB;IACtC,iBAAiB,EAAE,2BAA2B;IAC9C,aAAa,EAAE,uBAAuB;IACtC,SAAS,EAAE,mBAAmB;IAC9B,SAAS,EAAE,mBAAmB;IAC9B,cAAc,EAAE,wBAAwB;IACxC,eAAe,EAAE,yBAAyB;IAC1C,YAAY,EAAE,sBAAsB;IACpC,aAAa,EAAE,uBAAuB;IACtC,aAAa,EAAE,uBAAuB;IACtC,YAAY,EAAE,sBAAsB;IACpC,aAAa,EAAE,uBAAuB;IACtC,YAAY,EAAE,sBAAsB;IACpC,WAAW,EAAE,qBAAqB;IAClC,eAAe,EAAE,yBAAyB;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC;IAC7B,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,eAAe;IACf,cAAc;IACd,aAAa;CACd,CAAC,CAAC;AAIH,MAAM,UAAU,WAAW,CAAC,IAAgB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,IAAe,CAAC;IACpB,IAAI,CAAC;QACH,IAAI,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC3E,CAAC"}
|
package/dist/src/transport.d.ts
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { type Address, type Base64EncodedWireTransaction, type Blockhash, type Instruction, type Signature, type TransactionSigner } from "@solana/kit";
|
|
2
|
-
export type AccountView = {
|
|
3
|
-
owner: Address;
|
|
4
|
-
data: Uint8Array;
|
|
5
|
-
lamports: bigint;
|
|
6
|
-
executable?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type ProgramAccount = {
|
|
9
|
-
address: Address;
|
|
10
|
-
data: Uint8Array;
|
|
11
|
-
};
|
|
12
|
-
export type EngineTransaction = {
|
|
13
|
-
signature: string;
|
|
14
|
-
slot: bigint;
|
|
15
|
-
blockTime: bigint | null;
|
|
16
|
-
failed: boolean;
|
|
17
|
-
emitted: Uint8Array[];
|
|
18
|
-
memos?: string[];
|
|
19
|
-
unread?: true;
|
|
20
|
-
};
|
|
21
|
-
export type Latest = {
|
|
22
|
-
blockhash: Blockhash;
|
|
23
|
-
lastValidBlockHeight: bigint;
|
|
24
|
-
};
|
|
25
|
-
export type Simulation = {
|
|
26
|
-
err: string | null;
|
|
27
|
-
logs: string[];
|
|
28
|
-
unitsConsumed: bigint | null;
|
|
29
|
-
accounts: (Uint8Array | null)[];
|
|
30
|
-
};
|
|
31
|
-
export interface Transport {
|
|
32
|
-
getAccount(address: Address): Promise<AccountView | null>;
|
|
33
|
-
getAccounts(addresses: readonly Address[]): Promise<(AccountView | null)[]>;
|
|
34
|
-
warm?(addresses: readonly Address[]): Promise<void>;
|
|
35
|
-
send(instructions: readonly Instruction[], payer: TransactionSigner): Promise<string>;
|
|
36
|
-
latestBlockhash(): Promise<Latest>;
|
|
37
|
-
sendWire(wire: Base64EncodedWireTransaction, latest: Latest): Promise<string>;
|
|
38
|
-
submitWire(wire: Base64EncodedWireTransaction): Promise<string>;
|
|
39
|
-
simulate(wire: Base64EncodedWireTransaction, watch?: readonly Address[]): Promise<Simulation>;
|
|
40
|
-
genesisHash(): Promise<string>;
|
|
41
|
-
intents(owner?: Address): Promise<ProgramAccount[]>;
|
|
42
|
-
engineTransactions(limit: number, of?: Address): Promise<EngineTransaction[]>;
|
|
43
|
-
recentFees(accounts: readonly Address[]): Promise<bigint[]>;
|
|
44
|
-
budget(instructions: readonly Instruction[], feePayer: Address): Promise<Instruction[]>;
|
|
45
|
-
airdrop(address: Address, lamports: bigint): Promise<string>;
|
|
46
|
-
}
|
|
47
|
-
type Pending<T> = {
|
|
48
|
-
send(): Promise<T>;
|
|
49
|
-
};
|
|
50
|
-
type RawAccount = {
|
|
51
|
-
owner: Address;
|
|
52
|
-
data: readonly [string, string];
|
|
53
|
-
lamports: bigint;
|
|
54
|
-
executable: boolean;
|
|
55
|
-
};
|
|
56
|
-
export type RpcLike = {
|
|
57
|
-
getMultipleAccounts(addresses: Address[], config: {
|
|
58
|
-
encoding: "base64";
|
|
59
|
-
}): Pending<{
|
|
60
|
-
value: (RawAccount | null)[];
|
|
61
|
-
}>;
|
|
62
|
-
getAccountInfo(address: Address, config: {
|
|
63
|
-
encoding: "base64";
|
|
64
|
-
}): Pending<{
|
|
65
|
-
value: {
|
|
66
|
-
owner: Address;
|
|
67
|
-
data: readonly [string, string];
|
|
68
|
-
lamports: bigint;
|
|
69
|
-
executable: boolean;
|
|
70
|
-
} | null;
|
|
71
|
-
}>;
|
|
72
|
-
getLatestBlockhash(): Pending<{
|
|
73
|
-
value: {
|
|
74
|
-
blockhash: Blockhash;
|
|
75
|
-
lastValidBlockHeight: bigint;
|
|
76
|
-
};
|
|
77
|
-
}>;
|
|
78
|
-
sendTransaction(wire: Base64EncodedWireTransaction, config: {
|
|
79
|
-
encoding: "base64";
|
|
80
|
-
skipPreflight?: boolean;
|
|
81
|
-
}): Pending<Signature>;
|
|
82
|
-
simulateTransaction(wire: Base64EncodedWireTransaction, config: {
|
|
83
|
-
encoding: "base64";
|
|
84
|
-
sigVerify: false;
|
|
85
|
-
replaceRecentBlockhash: true;
|
|
86
|
-
accounts?: {
|
|
87
|
-
addresses: Address[];
|
|
88
|
-
encoding: "base64";
|
|
89
|
-
};
|
|
90
|
-
}): Pending<{
|
|
91
|
-
value: {
|
|
92
|
-
err: unknown;
|
|
93
|
-
logs: readonly string[] | null;
|
|
94
|
-
unitsConsumed?: bigint | undefined;
|
|
95
|
-
accounts?: readonly ({
|
|
96
|
-
data: readonly [string, string];
|
|
97
|
-
} | null)[] | null;
|
|
98
|
-
};
|
|
99
|
-
}>;
|
|
100
|
-
getSignatureStatuses(signatures: Signature[], config?: {
|
|
101
|
-
searchTransactionHistory: boolean;
|
|
102
|
-
}): Pending<{
|
|
103
|
-
context: {
|
|
104
|
-
slot: bigint;
|
|
105
|
-
};
|
|
106
|
-
value: readonly ({
|
|
107
|
-
err: unknown;
|
|
108
|
-
confirmationStatus: string | null;
|
|
109
|
-
} | null)[];
|
|
110
|
-
}>;
|
|
111
|
-
getEpochInfo(): Pending<{
|
|
112
|
-
blockHeight: bigint;
|
|
113
|
-
absoluteSlot: bigint;
|
|
114
|
-
}>;
|
|
115
|
-
requestAirdrop(address: Address, lamports: bigint): Pending<Signature>;
|
|
116
|
-
getRecentPrioritizationFees(addresses: readonly Address[]): Pending<readonly {
|
|
117
|
-
prioritizationFee: bigint;
|
|
118
|
-
}[]>;
|
|
119
|
-
getGenesisHash(): Pending<string>;
|
|
120
|
-
getProgramAccounts(program: Address, config: {
|
|
121
|
-
encoding: "base64";
|
|
122
|
-
filters: readonly ({
|
|
123
|
-
dataSize: bigint;
|
|
124
|
-
} | {
|
|
125
|
-
memcmp: {
|
|
126
|
-
offset: bigint;
|
|
127
|
-
bytes: string;
|
|
128
|
-
encoding: "base58";
|
|
129
|
-
};
|
|
130
|
-
})[];
|
|
131
|
-
}): Pending<readonly {
|
|
132
|
-
pubkey: Address;
|
|
133
|
-
account: {
|
|
134
|
-
data: readonly [string, string];
|
|
135
|
-
};
|
|
136
|
-
}[]>;
|
|
137
|
-
getSignaturesForAddress(address: Address, config: {
|
|
138
|
-
limit: number;
|
|
139
|
-
}): Pending<readonly {
|
|
140
|
-
signature: Signature;
|
|
141
|
-
slot: bigint;
|
|
142
|
-
blockTime: bigint | null;
|
|
143
|
-
err: unknown;
|
|
144
|
-
}[]>;
|
|
145
|
-
getTransaction(signature: Signature, config: {
|
|
146
|
-
encoding: "json";
|
|
147
|
-
maxSupportedTransactionVersion: 0;
|
|
148
|
-
commitment: "confirmed";
|
|
149
|
-
}): Pending<{
|
|
150
|
-
transaction: {
|
|
151
|
-
message: {
|
|
152
|
-
accountKeys: readonly Address[];
|
|
153
|
-
instructions?: readonly {
|
|
154
|
-
programIdIndex: number;
|
|
155
|
-
data: string;
|
|
156
|
-
}[];
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
meta: {
|
|
160
|
-
loadedAddresses?: {
|
|
161
|
-
writable: readonly Address[];
|
|
162
|
-
readonly: readonly Address[];
|
|
163
|
-
};
|
|
164
|
-
innerInstructions?: readonly {
|
|
165
|
-
instructions: readonly {
|
|
166
|
-
programIdIndex: number;
|
|
167
|
-
data: string;
|
|
168
|
-
}[];
|
|
169
|
-
}[] | null;
|
|
170
|
-
} | null;
|
|
171
|
-
} | null>;
|
|
172
|
-
};
|
|
173
|
-
export declare const MEMO_PROGRAM_ADDRESS: Address;
|
|
174
|
-
export declare const POLL_MS = 500;
|
|
175
|
-
export declare const CONFIRM_POLLS = 360;
|
|
176
|
-
export declare const RATE_LIMIT_ATTEMPTS = 6;
|
|
177
|
-
export declare function rateLimited(error: unknown): boolean;
|
|
178
|
-
export declare function patiently<T>(call: () => Promise<T>, wait?: (ms: number) => Promise<void>): Promise<T>;
|
|
179
|
-
export declare class Charged extends Error {
|
|
180
|
-
constructor(message: string);
|
|
181
|
-
}
|
|
182
|
-
export declare class FailedOnChain extends Charged {
|
|
183
|
-
}
|
|
184
|
-
export declare class BlockhashExpired extends Error {
|
|
185
|
-
constructor(message: string);
|
|
186
|
-
}
|
|
187
|
-
export declare const neverLanded: (error: unknown) => boolean;
|
|
188
|
-
export type SignatureWatch = (signature: Signature, signal: AbortSignal) => Promise<void>;
|
|
189
|
-
export declare function signatureWatch(url: string): SignatureWatch;
|
|
190
|
-
export declare function confirm(rpc: RpcLike, signature: Signature, lastValidBlockHeight: bigint, wait?: (ms: number) => Promise<void>, watch?: SignatureWatch): Promise<void>;
|
|
191
|
-
export declare function confirmSent(rpc: RpcLike, signature: Signature, lastValidBlockHeight: bigint, wait?: (ms: number) => Promise<void>, watch?: SignatureWatch): Promise<void>;
|
|
192
|
-
export declare const MULTIPLE_ACCOUNTS_LIMIT = 100;
|
|
193
|
-
export declare const TRANSACTION_FETCHES = 4;
|
|
194
|
-
export declare const KEPT_TRANSACTIONS = 256;
|
|
195
|
-
export declare const unmemoized: (transport: Transport) => Transport;
|
|
196
|
-
export declare function memoized(inner: Transport): Transport;
|
|
197
|
-
export declare function rpcTransport(rpc: RpcLike, wait?: (ms: number) => Promise<void>, watch?: SignatureWatch): Transport;
|
|
198
|
-
export type IntentChanges = {
|
|
199
|
-
wait(seconds: number): Promise<ProgramAccount[] | null>;
|
|
200
|
-
close(): void;
|
|
201
|
-
};
|
|
202
|
-
export type Notifications = (signal: AbortSignal) => Promise<AsyncIterable<unknown>>;
|
|
203
|
-
export declare function socketUrl(url: string): string;
|
|
204
|
-
export declare function intentNotifications(url: string): Notifications;
|
|
205
|
-
export declare function changedAccount(note: unknown): ProgramAccount | null;
|
|
206
|
-
export declare const RECONNECT_MS: readonly number[];
|
|
207
|
-
export declare function changesFrom(notifications: Notifications, reconnect?: readonly number[]): IntentChanges;
|
|
208
|
-
export {};
|