@pipeline-sol/sdk 0.0.0-stage → 0.1.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/README.md +209 -2
- package/dist/actions.d.ts +87 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +326 -0
- package/dist/actions.js.map +1 -0
- package/dist/codecs.d.ts +188 -0
- package/dist/codecs.d.ts.map +1 -0
- package/dist/codecs.js +296 -0
- package/dist/codecs.js.map +1 -0
- package/dist/constants.d.ts +97 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +98 -0
- package/dist/constants.js.map +1 -0
- package/dist/discovery.d.ts +17 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +47 -0
- package/dist/discovery.js.map +1 -0
- package/dist/events.d.ts +106 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +149 -0
- package/dist/events.js.map +1 -0
- package/dist/fees.d.ts +16 -0
- package/dist/fees.d.ts.map +1 -0
- package/dist/fees.js +60 -0
- package/dist/fees.js.map +1 -0
- package/dist/http.d.ts +23 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +99 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/inspect.d.ts +410 -0
- package/dist/inspect.d.ts.map +1 -0
- package/dist/inspect.js +828 -0
- package/dist/inspect.js.map +1 -0
- package/dist/instructions.d.ts +101 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +201 -0
- package/dist/instructions.js.map +1 -0
- package/dist/listing.d.ts +35 -0
- package/dist/listing.d.ts.map +1 -0
- package/dist/listing.js +49 -0
- package/dist/listing.js.map +1 -0
- package/dist/metadata.d.ts +266 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +515 -0
- package/dist/metadata.js.map +1 -0
- package/dist/pda.d.ts +21 -0
- package/dist/pda.d.ts.map +1 -0
- package/dist/pda.js +52 -0
- package/dist/pda.js.map +1 -0
- package/dist/quote.d.ts +63 -0
- package/dist/quote.d.ts.map +1 -0
- package/dist/quote.js +169 -0
- package/dist/quote.js.map +1 -0
- package/package.json +56 -5
- package/schema/strategy-metadata.v1.json +171 -0
package/dist/http.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// A bounded `fetch` for untrusted off-chain documents: a timeout, a size limit, and
|
|
2
|
+
// failures reported as values rather than exceptions.
|
|
3
|
+
/** Fetches `url` and reads at most `maxBytes` of its body. Never throws. */
|
|
4
|
+
export async function boundedFetch(url, options) {
|
|
5
|
+
const fetchFn = options.fetch ?? globalThis.fetch;
|
|
6
|
+
const controller = new AbortController();
|
|
7
|
+
let timedOut = false;
|
|
8
|
+
const timer = setTimeout(() => {
|
|
9
|
+
timedOut = true;
|
|
10
|
+
controller.abort();
|
|
11
|
+
}, options.timeoutMs);
|
|
12
|
+
const onAbort = () => controller.abort();
|
|
13
|
+
// A signal that was already aborted never fires `abort` again, so check it first.
|
|
14
|
+
if (options.signal?.aborted) {
|
|
15
|
+
controller.abort();
|
|
16
|
+
}
|
|
17
|
+
options.signal?.addEventListener('abort', onAbort);
|
|
18
|
+
try {
|
|
19
|
+
const response = await fetchFn(url, { signal: controller.signal, redirect: 'follow' });
|
|
20
|
+
// A redirect may lead off https (to plain http, or an internal address behind it).
|
|
21
|
+
// The final URL is empty for some fetch stand-ins; only a known non-https one fails.
|
|
22
|
+
if (response.url !== '' && !response.url.startsWith('https://')) {
|
|
23
|
+
await response.body?.cancel().catch(() => { });
|
|
24
|
+
return { ok: false, reason: 'network', message: `redirected off https to ${response.url}` };
|
|
25
|
+
}
|
|
26
|
+
if (!response.ok) {
|
|
27
|
+
await response.body?.cancel().catch(() => { });
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
reason: 'http-status',
|
|
31
|
+
status: response.status,
|
|
32
|
+
message: `HTTP ${response.status}`,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const declared = Number(response.headers.get('content-length') ?? NaN);
|
|
36
|
+
if (Number.isFinite(declared) && declared > options.maxBytes) {
|
|
37
|
+
await response.body?.cancel().catch(() => { });
|
|
38
|
+
return tooLarge(options.maxBytes);
|
|
39
|
+
}
|
|
40
|
+
const body = await readLimited(response, options.maxBytes);
|
|
41
|
+
if (body === null) {
|
|
42
|
+
return tooLarge(options.maxBytes);
|
|
43
|
+
}
|
|
44
|
+
return { ok: true, status: response.status, body };
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
if (timedOut) {
|
|
48
|
+
return { ok: false, reason: 'timeout', message: `no response within ${options.timeoutMs} ms` };
|
|
49
|
+
}
|
|
50
|
+
return { ok: false, reason: 'network', message: error instanceof Error ? error.message : String(error) };
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
options.signal?.removeEventListener('abort', onAbort);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function tooLarge(maxBytes) {
|
|
58
|
+
return { ok: false, reason: 'too-large', message: `response larger than ${maxBytes} bytes` };
|
|
59
|
+
}
|
|
60
|
+
/** The body, or `null` once it exceeds `maxBytes` (the rest is not downloaded). */
|
|
61
|
+
async function readLimited(response, maxBytes) {
|
|
62
|
+
if (response.body === null) {
|
|
63
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
64
|
+
return bytes.length > maxBytes ? null : bytes;
|
|
65
|
+
}
|
|
66
|
+
const reader = response.body.getReader();
|
|
67
|
+
const chunks = [];
|
|
68
|
+
let total = 0;
|
|
69
|
+
for (;;) {
|
|
70
|
+
const { done, value } = await reader.read();
|
|
71
|
+
if (done) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
total += value.length;
|
|
75
|
+
if (total > maxBytes) {
|
|
76
|
+
await reader.cancel().catch(() => { });
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
chunks.push(value);
|
|
80
|
+
}
|
|
81
|
+
const body = new Uint8Array(total);
|
|
82
|
+
let offset = 0;
|
|
83
|
+
for (const chunk of chunks) {
|
|
84
|
+
body.set(chunk, offset);
|
|
85
|
+
offset += chunk.length;
|
|
86
|
+
}
|
|
87
|
+
return body;
|
|
88
|
+
}
|
|
89
|
+
const utf8 = new TextDecoder('utf-8', { fatal: true });
|
|
90
|
+
/** Parses a UTF-8 JSON body, or returns `undefined`. */
|
|
91
|
+
export function parseJsonBody(body) {
|
|
92
|
+
try {
|
|
93
|
+
return JSON.parse(utf8.decode(body));
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sDAAsD;AAgBtD,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,OAA4B;IACxE,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC;IAClD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;QAC1B,QAAQ,GAAG,IAAI,CAAC;QAChB,UAAU,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACtB,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACzC,kFAAkF;IAClF,IAAI,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QAC1B,UAAU,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IACD,OAAO,C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AC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './actions.js';
|
|
2
|
+
export * from './codecs.js';
|
|
3
|
+
export * from './constants.js';
|
|
4
|
+
export * from './discovery.js';
|
|
5
|
+
export * from './events.js';
|
|
6
|
+
export * from './fees.js';
|
|
7
|
+
export * from './inspect.js';
|
|
8
|
+
export * from './instructions.js';
|
|
9
|
+
export * from './listing.js';
|
|
10
|
+
export * from './metadata.js';
|
|
11
|
+
export * from './pda.js';
|
|
12
|
+
export * from './quote.js';
|
|
13
|
+
export type { FetchLike } from './http.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './actions.js';
|
|
2
|
+
export * from './codecs.js';
|
|
3
|
+
export * from './constants.js';
|
|
4
|
+
export * from './discovery.js';
|
|
5
|
+
export * from './events.js';
|
|
6
|
+
export * from './fees.js';
|
|
7
|
+
export * from './inspect.js';
|
|
8
|
+
export * from './instructions.js';
|
|
9
|
+
export * from './listing.js';
|
|
10
|
+
export * from './metadata.js';
|
|
11
|
+
export * from './pda.js';
|
|
12
|
+
export * from './quote.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { type Address, type GetAccountInfoApi, type GetEpochInfoApi, type Rpc } from '@solana/kit';
|
|
2
|
+
import { type Market, type Strategy } from './codecs.js';
|
|
3
|
+
import { type FetchLike } from './http.js';
|
|
4
|
+
import { type FetchMetadataOptions, type MetadataGateways, type StrategyMetadata } from './metadata.js';
|
|
5
|
+
/**
|
|
6
|
+
* Every flag, with its exact meaning. Flag names are stable: new flags may be added, but
|
|
7
|
+
* existing ones keep their meaning.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FLAG_DESCRIPTIONS: {
|
|
10
|
+
readonly upgradeable: 'The strategy program can be upgraded: it has an upgrade authority (loader v3) or is not finalized (loader v4).';
|
|
11
|
+
readonly frozen: 'The strategy program can no longer be upgraded: no upgrade authority (loader v3), finalized (loader v4), or a non-upgradeable loader.';
|
|
12
|
+
readonly 'program-missing': 'No executable code at the strategy program address (never deployed, closed, or retracted).';
|
|
13
|
+
readonly 'verified-build': "OtterSec's verified-builds API reports the program as built from public source, and its hash matches the deployed code. Mainnet only; needs the SDK to hash the program (the default).";
|
|
14
|
+
readonly 'unverified-build': "OtterSec's verified-builds API answered but does not report a verified build of the deployed code. Not set when the API could not be reached, off mainnet, or when the program wasn't hashed.";
|
|
15
|
+
readonly unregistered: 'The program has no Strategy account in the router.';
|
|
16
|
+
readonly 'metadata-missing': "The strategy's metadata URI is empty.";
|
|
17
|
+
readonly 'metadata-unreachable': 'The metadata URI is unsupported, or could not be fetched (network error, timeout, HTTP error, too large).';
|
|
18
|
+
readonly 'metadata-invalid': 'The metadata document was fetched but is not valid strategy metadata version 1.';
|
|
19
|
+
readonly 'conformance-report': 'Valid metadata links a pipeline-check conformance report for the deployed code: its program id and executable hash match.';
|
|
20
|
+
readonly 'conformance-stale': 'Valid metadata links a pipeline-check conformance report for other code: its program id or executable hash differs from what is deployed.';
|
|
21
|
+
readonly 'checks-passed': "The hosted checks' latest run against the strategy's current code had no failures (warnings and skips allowed).";
|
|
22
|
+
readonly 'checks-failed': "The hosted checks' latest run against the strategy's current code had at least one failure.";
|
|
23
|
+
readonly 'checks-pending': "No hosted checks result for the strategy's current code yet: never run, or the strategy changed since the last run.";
|
|
24
|
+
readonly 'mint-unreadable': 'A market mint account is missing or is not an SPL Token or Token-2022 mint.';
|
|
25
|
+
readonly 'token-2022': 'A mint is owned by Token-2022.';
|
|
26
|
+
readonly 'mint-authority': 'A mint has a mint authority, so its supply can grow.';
|
|
27
|
+
readonly 'freeze-authority': 'A mint has a freeze authority, which can freeze token accounts (including market vaults and fee accounts).';
|
|
28
|
+
readonly 'transfer-hook': 'A mint has a transfer hook program set: every transfer calls it.';
|
|
29
|
+
readonly 'transfer-hook-authority': "A mint's transfer hook has an authority, which can set or change the hook program.";
|
|
30
|
+
readonly 'transfer-fee': 'A mint charges a non-zero transfer fee now, or from a scheduled epoch.';
|
|
31
|
+
readonly 'transfer-fee-authority': "A mint's transfer fee has an authority, which can set or change the fee.";
|
|
32
|
+
readonly 'permanent-delegate': 'A mint has a permanent delegate, which can transfer or burn tokens from any account.';
|
|
33
|
+
readonly 'non-transferable': 'A mint is non-transferable.';
|
|
34
|
+
readonly 'default-frozen': 'New token accounts for a mint start frozen (DefaultAccountState).';
|
|
35
|
+
readonly pausable: 'A mint is pausable: an authority can pause minting, burning and transfers.';
|
|
36
|
+
readonly paused: 'A mint is currently paused.';
|
|
37
|
+
readonly 'closable-mint': 'A mint has a close authority.';
|
|
38
|
+
readonly 'interest-bearing': 'A mint is interest-bearing: its UI amount differs from the raw amount.';
|
|
39
|
+
readonly 'scaled-ui-amount': 'A mint scales its UI amount by a multiplier an authority can change.';
|
|
40
|
+
readonly 'confidential-transfers': 'A mint supports confidential transfers.';
|
|
41
|
+
readonly 'permissioned-burn': 'Burning a mint requires an authority’s approval.';
|
|
42
|
+
readonly 'unknown-extension': 'A mint has a Token-2022 extension this SDK does not decode.';
|
|
43
|
+
};
|
|
44
|
+
export type Flag = keyof typeof FLAG_DESCRIPTIONS;
|
|
45
|
+
/** All flags, in a stable order. */
|
|
46
|
+
export declare const FLAGS: Flag[];
|
|
47
|
+
/**
|
|
48
|
+
* Keeps the items that have every `require` flag and none of the `exclude` flags. Works on
|
|
49
|
+
* anything with `flags`: market, strategy or mint inspections.
|
|
50
|
+
*/
|
|
51
|
+
export declare function filterMarkets<T extends {
|
|
52
|
+
flags: readonly Flag[];
|
|
53
|
+
}>(items: readonly T[], filter: {
|
|
54
|
+
exclude?: readonly Flag[];
|
|
55
|
+
require?: readonly Flag[];
|
|
56
|
+
}): T[];
|
|
57
|
+
export type InspectRpc = Rpc<GetAccountInfoApi & GetEpochInfoApi>;
|
|
58
|
+
export declare const LOADER_ADDRESSES: {
|
|
59
|
+
readonly v1: Address;
|
|
60
|
+
readonly v2: Address;
|
|
61
|
+
readonly upgradeable: Address;
|
|
62
|
+
readonly v4: Address;
|
|
63
|
+
readonly native: Address;
|
|
64
|
+
};
|
|
65
|
+
export type ProgramLoader = 'upgradeable' | 'v4' | 'v2' | 'v1' | 'native' | 'other' | 'none';
|
|
66
|
+
/** Bytes before the ELF in a loader-v3 ProgramData account. */
|
|
67
|
+
export declare const PROGRAMDATA_METADATA_LEN = 45;
|
|
68
|
+
/** Bytes before the ELF in a loader-v4 program account. */
|
|
69
|
+
export declare const LOADER_V4_METADATA_LEN = 48;
|
|
70
|
+
export type ProgramInspection = {
|
|
71
|
+
programId: Address;
|
|
72
|
+
/** `none` when there is no account at the address. */
|
|
73
|
+
loader: ProgramLoader;
|
|
74
|
+
/** The loader (owner) address, or `null` with no account. */
|
|
75
|
+
loaderAddress: Address | null;
|
|
76
|
+
/** Executable code is deployed. */
|
|
77
|
+
deployed: boolean;
|
|
78
|
+
upgradeable: boolean;
|
|
79
|
+
/** `null` when the program is frozen (or for loaders without one). */
|
|
80
|
+
upgradeAuthority: Address | null;
|
|
81
|
+
/** Loader v3 only. */
|
|
82
|
+
programDataAddress: Address | null;
|
|
83
|
+
/** Slot of the last deployment or upgrade (loaders v3 and v4). */
|
|
84
|
+
lastDeploySlot: bigint | null;
|
|
85
|
+
/** Loader v4 only. */
|
|
86
|
+
/** `unknown` is a status number this SDK doesn't know; it sets neither program flag. */
|
|
87
|
+
loaderV4Status: 'retracted' | 'deployed' | 'finalized' | 'unknown' | null;
|
|
88
|
+
/**
|
|
89
|
+
* Lowercase hex SHA-256 of the program's ELF with trailing zero bytes removed. For
|
|
90
|
+
* loader v3 the ELF region is the ProgramData account after its 45-byte header; for
|
|
91
|
+
* loaders v1 and v2 it is the whole program account. This equals
|
|
92
|
+
* `solana-verify get-program-hash` and OtterSec's `on_chain_hash`. For loader v4
|
|
93
|
+
* (which `solana-verify` doesn't support) the program account after its 48-byte
|
|
94
|
+
* header, trimmed the same way. `null` when not computed or not deployed.
|
|
95
|
+
*/
|
|
96
|
+
executableSha256: string | null;
|
|
97
|
+
flags: Flag[];
|
|
98
|
+
};
|
|
99
|
+
export type InspectProgramOptions = {
|
|
100
|
+
/**
|
|
101
|
+
* Download the program's code to compute {@link ProgramInspection.executableSha256}.
|
|
102
|
+
* Defaults to `true`; ProgramData accounts can be several megabytes.
|
|
103
|
+
*/
|
|
104
|
+
hashExecutable?: boolean;
|
|
105
|
+
};
|
|
106
|
+
/** Loader, upgradeability, upgrade authority, last deploy slot and code hash of a program. */
|
|
107
|
+
export declare function inspectProgram(rpc: Rpc<GetAccountInfoApi>, programId: Address, options?: InspectProgramOptions): Promise<ProgramInspection>;
|
|
108
|
+
export declare const DEFAULT_VERIFY_API_URL = "https://verify.osec.io";
|
|
109
|
+
export type VerifiedBuild = {
|
|
110
|
+
/**
|
|
111
|
+
* `unknown` when the API could not be reached or answered unexpectedly;
|
|
112
|
+
* `not-applicable` when the program is not on mainnet (see {@link Cluster}).
|
|
113
|
+
*/
|
|
114
|
+
status: 'verified' | 'unverified' | 'unknown' | 'not-applicable';
|
|
115
|
+
verified: boolean;
|
|
116
|
+
repository: string | null;
|
|
117
|
+
commit: string | null;
|
|
118
|
+
/** OtterSec's hash of the deployed code (as {@link ProgramInspection.executableSha256}). */
|
|
119
|
+
onchainHash: string | null;
|
|
120
|
+
/** OtterSec's hash of the build from source. */
|
|
121
|
+
executableHash: string | null;
|
|
122
|
+
/** ISO timestamp, without a time zone, as the API returns it. */
|
|
123
|
+
lastVerifiedAt: string | null;
|
|
124
|
+
message: string | null;
|
|
125
|
+
/** Why the status is `unknown`. */
|
|
126
|
+
error?: string;
|
|
127
|
+
};
|
|
128
|
+
export type VerifiedBuildOptions = {
|
|
129
|
+
fetch?: FetchLike;
|
|
130
|
+
/** Defaults to `https://verify.osec.io`. */
|
|
131
|
+
apiUrl?: string;
|
|
132
|
+
/** Defaults to 10 seconds. */
|
|
133
|
+
timeoutMs?: number;
|
|
134
|
+
signal?: AbortSignal;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* The program's status in OtterSec's verified-builds API
|
|
138
|
+
* (`GET <apiUrl>/status/<programId>`). OtterSec only covers mainnet programs: a devnet
|
|
139
|
+
* address is looked up as if it were on mainnet. Never throws: network or format errors
|
|
140
|
+
* give status `unknown`.
|
|
141
|
+
*/
|
|
142
|
+
export declare function fetchVerifiedBuild(programId: Address, options?: VerifiedBuildOptions): Promise<VerifiedBuild>;
|
|
143
|
+
/** Token-2022 extension type numbers (`ExtensionType`). */
|
|
144
|
+
export declare const EXTENSION_TYPES: {
|
|
145
|
+
readonly TransferFeeConfig: 1;
|
|
146
|
+
readonly MintCloseAuthority: 3;
|
|
147
|
+
readonly ConfidentialTransferMint: 4;
|
|
148
|
+
readonly DefaultAccountState: 6;
|
|
149
|
+
readonly NonTransferable: 9;
|
|
150
|
+
readonly InterestBearingConfig: 10;
|
|
151
|
+
readonly PermanentDelegate: 12;
|
|
152
|
+
readonly TransferHook: 14;
|
|
153
|
+
readonly ConfidentialTransferFeeConfig: 16;
|
|
154
|
+
readonly MetadataPointer: 18;
|
|
155
|
+
readonly TokenMetadata: 19;
|
|
156
|
+
readonly GroupPointer: 20;
|
|
157
|
+
readonly TokenGroup: 21;
|
|
158
|
+
readonly GroupMemberPointer: 22;
|
|
159
|
+
readonly TokenGroupMember: 23;
|
|
160
|
+
readonly ConfidentialMintBurn: 24;
|
|
161
|
+
readonly ScaledUiAmount: 25;
|
|
162
|
+
readonly Pausable: 26;
|
|
163
|
+
readonly PermissionedBurn: 28;
|
|
164
|
+
};
|
|
165
|
+
export type TransferFee = {
|
|
166
|
+
epoch: bigint;
|
|
167
|
+
maximumFee: bigint;
|
|
168
|
+
basisPoints: number;
|
|
169
|
+
};
|
|
170
|
+
/** Decoded Token-2022 mint extensions. Absent keys mean the extension is absent. */
|
|
171
|
+
export type MintExtensions = {
|
|
172
|
+
transferFee?: {
|
|
173
|
+
authority: Address | null;
|
|
174
|
+
withdrawWithheldAuthority: Address | null;
|
|
175
|
+
withheldAmount: bigint;
|
|
176
|
+
older: TransferFee;
|
|
177
|
+
newer: TransferFee;
|
|
178
|
+
/** The fee in force at the inspected epoch. */
|
|
179
|
+
current: TransferFee;
|
|
180
|
+
};
|
|
181
|
+
mintCloseAuthority?: {
|
|
182
|
+
closeAuthority: Address | null;
|
|
183
|
+
};
|
|
184
|
+
confidentialTransfer?: {
|
|
185
|
+
authority: Address | null;
|
|
186
|
+
autoApproveNewAccounts: boolean;
|
|
187
|
+
};
|
|
188
|
+
confidentialTransferFee?: {
|
|
189
|
+
authority: Address | null;
|
|
190
|
+
};
|
|
191
|
+
confidentialMintBurn?: true;
|
|
192
|
+
defaultAccountState?: {
|
|
193
|
+
state: 'uninitialized' | 'initialized' | 'frozen';
|
|
194
|
+
};
|
|
195
|
+
nonTransferable?: true;
|
|
196
|
+
interestBearing?: {
|
|
197
|
+
rateAuthority: Address | null;
|
|
198
|
+
initializationTimestamp: bigint;
|
|
199
|
+
preUpdateAverageRateBps: number;
|
|
200
|
+
lastUpdateTimestamp: bigint;
|
|
201
|
+
currentRateBps: number;
|
|
202
|
+
};
|
|
203
|
+
permanentDelegate?: {
|
|
204
|
+
delegate: Address | null;
|
|
205
|
+
};
|
|
206
|
+
transferHook?: {
|
|
207
|
+
authority: Address | null;
|
|
208
|
+
programId: Address | null;
|
|
209
|
+
};
|
|
210
|
+
metadataPointer?: {
|
|
211
|
+
authority: Address | null;
|
|
212
|
+
metadataAddress: Address | null;
|
|
213
|
+
};
|
|
214
|
+
tokenMetadata?: {
|
|
215
|
+
updateAuthority: Address | null;
|
|
216
|
+
mint: Address;
|
|
217
|
+
name: string;
|
|
218
|
+
symbol: string;
|
|
219
|
+
uri: string;
|
|
220
|
+
additionalMetadata: [string, string][];
|
|
221
|
+
};
|
|
222
|
+
groupPointer?: {
|
|
223
|
+
authority: Address | null;
|
|
224
|
+
groupAddress: Address | null;
|
|
225
|
+
};
|
|
226
|
+
tokenGroup?: {
|
|
227
|
+
updateAuthority: Address | null;
|
|
228
|
+
mint: Address;
|
|
229
|
+
size: bigint;
|
|
230
|
+
maxSize: bigint;
|
|
231
|
+
};
|
|
232
|
+
groupMemberPointer?: {
|
|
233
|
+
authority: Address | null;
|
|
234
|
+
memberAddress: Address | null;
|
|
235
|
+
};
|
|
236
|
+
tokenGroupMember?: {
|
|
237
|
+
mint: Address;
|
|
238
|
+
group: Address;
|
|
239
|
+
memberNumber: bigint;
|
|
240
|
+
};
|
|
241
|
+
scaledUiAmount?: {
|
|
242
|
+
authority: Address | null;
|
|
243
|
+
multiplier: number;
|
|
244
|
+
newMultiplierEffectiveTimestamp: bigint;
|
|
245
|
+
newMultiplier: number;
|
|
246
|
+
};
|
|
247
|
+
pausable?: {
|
|
248
|
+
authority: Address | null;
|
|
249
|
+
paused: boolean;
|
|
250
|
+
};
|
|
251
|
+
permissionedBurn?: {
|
|
252
|
+
authority: Address | null;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
export type MintInspection = {
|
|
256
|
+
mint: Address;
|
|
257
|
+
tokenProgram: Address;
|
|
258
|
+
decimals: number;
|
|
259
|
+
supply: bigint;
|
|
260
|
+
mintAuthority: Address | null;
|
|
261
|
+
freezeAuthority: Address | null;
|
|
262
|
+
extensions: MintExtensions;
|
|
263
|
+
/** Every extension type number present, in account order. */
|
|
264
|
+
extensionTypes: number[];
|
|
265
|
+
/** Extension types this SDK does not decode (or could not decode). */
|
|
266
|
+
unknownExtensions: number[];
|
|
267
|
+
flags: Flag[];
|
|
268
|
+
};
|
|
269
|
+
export type InspectMintOptions = {
|
|
270
|
+
/** Epoch for choosing the transfer fee in force. Fetched with `getEpochInfo` if needed. */
|
|
271
|
+
epoch?: bigint;
|
|
272
|
+
};
|
|
273
|
+
/** Token program, supply, authorities and decoded Token-2022 extensions of a mint. `null` if not a mint. */
|
|
274
|
+
export declare function inspectMint(rpc: InspectRpc, mint: Address, options?: InspectMintOptions): Promise<MintInspection | null>;
|
|
275
|
+
/**
|
|
276
|
+
* Decodes mint account bytes owned by `tokenProgram`. `epoch` picks the transfer fee in
|
|
277
|
+
* force. `null` if the bytes are not an initialized mint.
|
|
278
|
+
*/
|
|
279
|
+
export declare function decodeMint(mint: Address, tokenProgram: Address, data: Uint8Array, epoch?: bigint): MintInspection | null;
|
|
280
|
+
/** The largest conformance report fetched. */
|
|
281
|
+
export declare const CONFORMANCE_REPORT_MAX_BYTES: number;
|
|
282
|
+
/** The `schema` of a `pipeline-check` JSON report. */
|
|
283
|
+
export declare const CHECK_REPORT_SCHEMA = "pipeline-check-report/1";
|
|
284
|
+
/**
|
|
285
|
+
* Why a conformance report isn't `current`: `unreachable` (unsupported URL or failed
|
|
286
|
+
* fetch), `sha256-mismatch` (the body isn't the report `conformance.sha256` pins),
|
|
287
|
+
* `not-json`, `not-a-report` (no `pipeline-check-report/1` strategy section),
|
|
288
|
+
* `code-not-hashed` (the deployed code's hash is unknown), `other-program` or `other-code`.
|
|
289
|
+
*/
|
|
290
|
+
export type ConformanceReason = 'unreachable' | 'sha256-mismatch' | 'not-json' | 'not-a-report' | 'code-not-hashed' | 'other-program' | 'other-code';
|
|
291
|
+
/** Whether a strategy's self-published conformance report is about its deployed code. */
|
|
292
|
+
export type ConformanceFacts = {
|
|
293
|
+
/** `current`: flag `conformance-report`; `stale`: `conformance-stale`; `unverified`: neither. */
|
|
294
|
+
status: 'current' | 'stale' | 'unverified';
|
|
295
|
+
reason: ConformanceReason | null;
|
|
296
|
+
/** The URL fetched (gateway-resolved for `ipfs://` and `ar://`). */
|
|
297
|
+
url: string | null;
|
|
298
|
+
/** Lowercase hex SHA-256 of the report as fetched. */
|
|
299
|
+
reportSha256: string | null;
|
|
300
|
+
programId: string | null;
|
|
301
|
+
executableSha256: string | null;
|
|
302
|
+
/** The report's overall result (`pass`, `warn`, `fail`), as published. */
|
|
303
|
+
result: string | null;
|
|
304
|
+
/** Unix seconds when the report was produced, as published. */
|
|
305
|
+
generatedAt: number | null;
|
|
306
|
+
/** The fetch error, when `unreachable`. */
|
|
307
|
+
error?: string;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Checks a fetched conformance report against the deployed program. `pinnedSha256` is the
|
|
311
|
+
* metadata's `conformance.sha256`, if any; `deployedSha256` is
|
|
312
|
+
* {@link ProgramInspection.executableSha256}, if known. Never throws.
|
|
313
|
+
*/
|
|
314
|
+
export declare function evaluateConformanceReport(body: Uint8Array, pinnedSha256: string | null, programId: Address, deployedSha256: string | null): Promise<ConformanceFacts>;
|
|
315
|
+
export type FetchConformanceOptions = {
|
|
316
|
+
fetch?: FetchLike;
|
|
317
|
+
gateways?: MetadataGateways;
|
|
318
|
+
/** Defaults to 1 MiB. */
|
|
319
|
+
maxBytes?: number;
|
|
320
|
+
/** Defaults to 10 seconds. */
|
|
321
|
+
timeoutMs?: number;
|
|
322
|
+
signal?: AbortSignal;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Fetches a conformance report (`https://`, `ipfs://` or `ar://`) with the same rules as
|
|
326
|
+
* metadata, and checks it with {@link evaluateConformanceReport}. Never throws.
|
|
327
|
+
*/
|
|
328
|
+
export declare function fetchConformanceReport(report: string, pinnedSha256: string | null, programId: Address, deployedSha256: string | null, options?: FetchConformanceOptions): Promise<ConformanceFacts>;
|
|
329
|
+
export type MetadataFacts = {
|
|
330
|
+
status: 'missing';
|
|
331
|
+
uri: '';
|
|
332
|
+
} | {
|
|
333
|
+
status: 'not-fetched';
|
|
334
|
+
uri: string;
|
|
335
|
+
} | {
|
|
336
|
+
status: 'unreachable' | 'invalid';
|
|
337
|
+
uri: string;
|
|
338
|
+
errors: string[];
|
|
339
|
+
} | {
|
|
340
|
+
status: 'valid';
|
|
341
|
+
uri: string;
|
|
342
|
+
value: StrategyMetadata;
|
|
343
|
+
warnings: string[];
|
|
344
|
+
};
|
|
345
|
+
export type StrategyInspection = {
|
|
346
|
+
programId: Address;
|
|
347
|
+
/** The router's Strategy account address. */
|
|
348
|
+
strategyAccount: Address;
|
|
349
|
+
/** `null` when the program is not registered. */
|
|
350
|
+
registration: Strategy | null;
|
|
351
|
+
program: ProgramInspection;
|
|
352
|
+
metadata: MetadataFacts;
|
|
353
|
+
/** `null` when not requested. */
|
|
354
|
+
verifiedBuild: VerifiedBuild | null;
|
|
355
|
+
/**
|
|
356
|
+
* The conformance report valid metadata links, checked against the deployed code.
|
|
357
|
+
* `null` when there is none, or it was not fetched.
|
|
358
|
+
*/
|
|
359
|
+
conformance: ConformanceFacts | null;
|
|
360
|
+
flags: Flag[];
|
|
361
|
+
};
|
|
362
|
+
/** The cluster the RPC client talks to. */
|
|
363
|
+
export type Cluster = 'mainnet' | 'devnet' | 'testnet' | 'localnet';
|
|
364
|
+
export type InspectStrategyOptions = InspectProgramOptions & {
|
|
365
|
+
/**
|
|
366
|
+
* The RPC's cluster, if known. OtterSec's verified-builds API only covers mainnet, so
|
|
367
|
+
* on any other cluster the lookup is skipped, `verifiedBuild.status` is
|
|
368
|
+
* `not-applicable` and neither build flag is set. Unset means the lookup runs.
|
|
369
|
+
*/
|
|
370
|
+
cluster?: Cluster;
|
|
371
|
+
/** Shared by the metadata and verified-build requests unless overridden there. */
|
|
372
|
+
fetch?: FetchLike;
|
|
373
|
+
/** Fetch and validate the metadata document. Defaults to `true`. */
|
|
374
|
+
metadata?: boolean | FetchMetadataOptions;
|
|
375
|
+
/** Ask OtterSec's verified-builds API. Defaults to `true`. */
|
|
376
|
+
verifiedBuild?: boolean | VerifiedBuildOptions;
|
|
377
|
+
/**
|
|
378
|
+
* Fetch the conformance report valid metadata links and check it against the deployed
|
|
379
|
+
* code. Defaults to `true`. Without it neither conformance flag is set.
|
|
380
|
+
*/
|
|
381
|
+
conformanceReport?: boolean | FetchConformanceOptions;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* A strategy's registration (registered_at, market_count, metadata_uri), its program
|
|
385
|
+
* facts, its metadata document and its verified-build status, with flags.
|
|
386
|
+
*/
|
|
387
|
+
export declare function inspectStrategy(rpc: Rpc<GetAccountInfoApi>, programId: Address, options?: InspectStrategyOptions): Promise<StrategyInspection>;
|
|
388
|
+
export type MarketInspection = {
|
|
389
|
+
address: Address;
|
|
390
|
+
market: Market;
|
|
391
|
+
mints: Address[];
|
|
392
|
+
createdBy: Address;
|
|
393
|
+
createdAt: bigint;
|
|
394
|
+
strategy: StrategyInspection;
|
|
395
|
+
/** One per mint, in market order; `null` for an unreadable mint. */
|
|
396
|
+
mintInspections: (MintInspection | null)[];
|
|
397
|
+
/** The strategy's flags and every mint's flags. */
|
|
398
|
+
flags: Flag[];
|
|
399
|
+
};
|
|
400
|
+
export type InspectMarketOptions = InspectStrategyOptions & InspectMintOptions & {
|
|
401
|
+
/** A strategy inspection to reuse, for example across many markets of one strategy. */
|
|
402
|
+
strategy?: StrategyInspection;
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* A recorded market (mints, created_by, created_at), its strategy's inspection and each
|
|
406
|
+
* mint's inspection, with the union of their flags. `null` if `market` is not a router
|
|
407
|
+
* Market account.
|
|
408
|
+
*/
|
|
409
|
+
export declare function inspectMarket(rpc: InspectRpc, market: Address, options?: InspectMarketOptions): Promise<MarketInspection | null>;
|
|
410
|
+
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAIA,OAAO,EAGH,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,GAAG,EACX,MAAM,aAAa,CAAC;AAErB,OAAO,EAA6C,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAOpG,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAGH,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACxB,MAAM,eAAe,CAAC;AAOvB;;;GAGG;AACH,eAAO,MAAM,iBAAiB;aAE1B,WAAW,EACP,gHAAgH;aACpH,MAAM,EAAE,uIAAuI;aAC/I,iBAAiB,EAAE,4FAA4F;aAC/G,gBAAgB,EACZ,wLAAwL;aAC5L,kBAAkB,EACd,+LAA+L;aAEnM,YAAY,EAAE,oDAAoD;aAClE,kBAAkB,EAAE,uCAAuC;aAC3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