madeonsol-x402 4.0.0 → 4.2.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 +176 -3
- package/dist/early-codec.d.ts +4 -0
- package/dist/early-codec.d.ts.map +1 -0
- package/dist/early-codec.js +44 -0
- package/dist/early-codec.js.map +1 -0
- package/dist/early-stream.d.ts +85 -0
- package/dist/early-stream.d.ts.map +1 -0
- package/dist/early-stream.js +399 -0
- package/dist/early-stream.js.map +1 -0
- package/dist/early-subscriptions.d.ts +9 -0
- package/dist/early-subscriptions.d.ts.map +1 -0
- package/dist/early-subscriptions.js +25 -0
- package/dist/early-subscriptions.js.map +1 -0
- package/dist/index.d.ts +21 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +422 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -673,12 +673,13 @@ export interface StreamToken {
|
|
|
673
673
|
/** Present only for activated ShredPrism and ULTRA/BUSINESS/ENTERPRISE. */
|
|
674
674
|
early_ws_url?: string;
|
|
675
675
|
early_stream?: {
|
|
676
|
-
channels: "early:deploys"[];
|
|
676
|
+
channels: ("early:deploys" | "early:locks" | "early:trades" | "early:liquidity" | "early:migrations" | "early:token_changes")[];
|
|
677
677
|
subscribe_example: {
|
|
678
678
|
type: "subscribe";
|
|
679
|
-
channels: "early:deploys"[];
|
|
679
|
+
channels: ("early:deploys" | "early:locks" | "early:trades" | "early:liquidity" | "early:migrations" | "early:token_changes")[];
|
|
680
680
|
};
|
|
681
681
|
execution_status: "unknown";
|
|
682
|
+
coverage: string;
|
|
682
683
|
note: string;
|
|
683
684
|
};
|
|
684
685
|
/** DEX trade stream URL — only present for Ultra tier subscribers */
|
|
@@ -1509,6 +1510,12 @@ export interface CandlesParams {
|
|
|
1509
1510
|
from?: string;
|
|
1510
1511
|
/** ISO 8601 end of range (inclusive). */
|
|
1511
1512
|
to?: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* Keyed API only: "allow" opts in to partial delivery. When the server read budget runs out,
|
|
1515
|
+
* the answer is then 200 with truncated=true and covered_from (continue with to=covered_from)
|
|
1516
|
+
* instead of 503 read_budget_exhausted.
|
|
1517
|
+
*/
|
|
1518
|
+
partial?: "allow";
|
|
1512
1519
|
}
|
|
1513
1520
|
/**
|
|
1514
1521
|
* One OHLC bucket. The `t`…`market_cap_usd` fields are present on all tiers
|
|
@@ -3085,6 +3092,332 @@ export interface TokenTopTradersResponse {
|
|
|
3085
3092
|
* `traders` list means "outside the write-gate", not "nobody traded". */
|
|
3086
3093
|
coverage?: TradeCoverage;
|
|
3087
3094
|
}
|
|
3095
|
+
/** Early WebSocket control contract; only channels advertised in `early_stream.channels` are served. */
|
|
3096
|
+
export type EarlyChannel = "early:deploys" | "early:locks" | "early:trades" | "early:liquidity" | "early:migrations" | "early:token_changes";
|
|
3097
|
+
export type EarlyEventFormat = "full" | "compact-v1";
|
|
3098
|
+
export type EarlyAmountField = "requested_amount_raw" | "requested_input_raw" | "max_input_raw" | "min_output_raw" | "target_output_raw" | "target_lp_output_raw" | "requested_lp_input_raw" | "max_base_input_raw" | "max_quote_input_raw" | "min_base_output_raw" | "min_quote_output_raw" | "requested_base_input_raw" | "requested_quote_input_raw";
|
|
3099
|
+
/** One or both inclusive bounds, canonical unsigned decimal u64 strings.
|
|
3100
|
+
* These fields are requested instruction arguments, never realized fills or USD. */
|
|
3101
|
+
export type EarlyAmountFilter = {
|
|
3102
|
+
field: EarlyAmountField;
|
|
3103
|
+
mint: string;
|
|
3104
|
+
} & ({
|
|
3105
|
+
min_raw: string;
|
|
3106
|
+
max_raw?: string;
|
|
3107
|
+
} | {
|
|
3108
|
+
min_raw?: string;
|
|
3109
|
+
max_raw: string;
|
|
3110
|
+
});
|
|
3111
|
+
/** Fields every ShredPrism observation carries inside `frame.data`. */
|
|
3112
|
+
export interface EarlyObservationBase {
|
|
3113
|
+
schema_version: 1;
|
|
3114
|
+
chain: "solana";
|
|
3115
|
+
channel: EarlyChannel;
|
|
3116
|
+
signature: string;
|
|
3117
|
+
event_id: string;
|
|
3118
|
+
observed_slot: string;
|
|
3119
|
+
first_observed_at: string;
|
|
3120
|
+
source: "shredprism";
|
|
3121
|
+
source_region: string;
|
|
3122
|
+
observation_stage: "observed";
|
|
3123
|
+
execution_status: "unknown";
|
|
3124
|
+
decoding_basis: "outer_instruction";
|
|
3125
|
+
decoder_version: "deploys-1" | "channels-1";
|
|
3126
|
+
transaction_version: "legacy" | 0 | 1;
|
|
3127
|
+
transaction_config: EarlyTransactionConfig | null;
|
|
3128
|
+
lifetime_token: string;
|
|
3129
|
+
outer_instruction_index: number;
|
|
3130
|
+
program_id: string;
|
|
3131
|
+
fee_payer: string;
|
|
3132
|
+
action: string;
|
|
3133
|
+
actor: string;
|
|
3134
|
+
attribution_basis: string;
|
|
3135
|
+
/** Roster snapshot for `actor`: present on every non-deploy event, absent on `early:deploys`. A database snapshot, not an on-chain fact. */
|
|
3136
|
+
wallet_label?: EarlyWalletLabel;
|
|
3137
|
+
}
|
|
3138
|
+
/** `wallet_label` on non-deploy ShredPrism events. Only `early:trades` accepts the `wallet_labels` filter. */
|
|
3139
|
+
export interface EarlyWalletLabel {
|
|
3140
|
+
wallet: string;
|
|
3141
|
+
labels: ("kol" | "dev" | "alpha")[];
|
|
3142
|
+
available_labels: ("kol" | "dev" | "alpha")[];
|
|
3143
|
+
observed_at_ms: number | null;
|
|
3144
|
+
basis: "database_roster_snapshot";
|
|
3145
|
+
complete: boolean;
|
|
3146
|
+
}
|
|
3147
|
+
/** Supported `early:deploys` create observation. */
|
|
3148
|
+
export interface EarlyDeployObservationData extends EarlyObservationBase {
|
|
3149
|
+
channel: "early:deploys";
|
|
3150
|
+
decoder_version: "deploys-1";
|
|
3151
|
+
action: "create";
|
|
3152
|
+
instruction: "create" | "create_v2" | "initialize" | "initialize_v2" | "initialize_with_token_2022";
|
|
3153
|
+
mint: string;
|
|
3154
|
+
launchpad: "pumpfun" | "launchlab";
|
|
3155
|
+
attribution_basis: "instruction_user";
|
|
3156
|
+
name: string | null;
|
|
3157
|
+
symbol: string | null;
|
|
3158
|
+
}
|
|
3159
|
+
/** Supported Pump.fun/PumpSwap `early:trades` instruction intent. */
|
|
3160
|
+
export interface EarlyTradeObservationData extends EarlyObservationBase {
|
|
3161
|
+
channel: "early:trades";
|
|
3162
|
+
decoder_version: "channels-1";
|
|
3163
|
+
protocol: "pumpfun" | "pumpswap";
|
|
3164
|
+
instruction: "buy" | "sell" | "buy_exact_sol_in" | "buy_exact_quote_in";
|
|
3165
|
+
action: "swap_intent";
|
|
3166
|
+
attribution_basis: "instruction_user";
|
|
3167
|
+
mint: string;
|
|
3168
|
+
quote_mint: string;
|
|
3169
|
+
pool: string;
|
|
3170
|
+
direction: "buy" | "sell";
|
|
3171
|
+
swap_mode: "exact_in" | "exact_out";
|
|
3172
|
+
input_mint: string;
|
|
3173
|
+
output_mint: string;
|
|
3174
|
+
requested_input_raw: string | null;
|
|
3175
|
+
max_input_raw: string | null;
|
|
3176
|
+
min_output_raw: string | null;
|
|
3177
|
+
target_output_raw: string | null;
|
|
3178
|
+
}
|
|
3179
|
+
export interface EarlyLiquidityCreatePoolObservationData extends EarlyObservationBase {
|
|
3180
|
+
channel: "early:liquidity";
|
|
3181
|
+
decoder_version: "channels-1";
|
|
3182
|
+
protocol: "pumpswap";
|
|
3183
|
+
instruction: "create_pool";
|
|
3184
|
+
action: "create_pool";
|
|
3185
|
+
attribution_basis: "instruction_creator";
|
|
3186
|
+
pool: string;
|
|
3187
|
+
mint: string;
|
|
3188
|
+
quote_mint: string;
|
|
3189
|
+
lp_mint: string;
|
|
3190
|
+
pool_index: number;
|
|
3191
|
+
requested_base_input_raw: string;
|
|
3192
|
+
requested_quote_input_raw: string;
|
|
3193
|
+
coin_creator: string;
|
|
3194
|
+
}
|
|
3195
|
+
export interface EarlyLiquidityAddObservationData extends EarlyObservationBase {
|
|
3196
|
+
channel: "early:liquidity";
|
|
3197
|
+
decoder_version: "channels-1";
|
|
3198
|
+
protocol: "pumpswap";
|
|
3199
|
+
instruction: "deposit";
|
|
3200
|
+
action: "add_liquidity";
|
|
3201
|
+
attribution_basis: "instruction_user";
|
|
3202
|
+
pool: string;
|
|
3203
|
+
mint: string;
|
|
3204
|
+
quote_mint: string;
|
|
3205
|
+
lp_mint: string;
|
|
3206
|
+
target_lp_output_raw: string;
|
|
3207
|
+
max_base_input_raw: string;
|
|
3208
|
+
max_quote_input_raw: string;
|
|
3209
|
+
}
|
|
3210
|
+
export interface EarlyLiquidityRemoveObservationData extends EarlyObservationBase {
|
|
3211
|
+
channel: "early:liquidity";
|
|
3212
|
+
decoder_version: "channels-1";
|
|
3213
|
+
protocol: "pumpswap";
|
|
3214
|
+
instruction: "withdraw";
|
|
3215
|
+
action: "remove_liquidity";
|
|
3216
|
+
attribution_basis: "instruction_user";
|
|
3217
|
+
pool: string;
|
|
3218
|
+
mint: string;
|
|
3219
|
+
quote_mint: string;
|
|
3220
|
+
lp_mint: string;
|
|
3221
|
+
requested_lp_input_raw: string;
|
|
3222
|
+
min_base_output_raw: string;
|
|
3223
|
+
min_quote_output_raw: string;
|
|
3224
|
+
}
|
|
3225
|
+
export type EarlyLiquidityObservationData = EarlyLiquidityCreatePoolObservationData | EarlyLiquidityAddObservationData | EarlyLiquidityRemoveObservationData;
|
|
3226
|
+
/** Pump.fun migration instruction observed before execution proof. */
|
|
3227
|
+
export interface EarlyMigrationObservationData extends EarlyObservationBase {
|
|
3228
|
+
channel: "early:migrations";
|
|
3229
|
+
decoder_version: "channels-1";
|
|
3230
|
+
protocol: "pumpfun";
|
|
3231
|
+
instruction: "migrate" | "migrate_v2";
|
|
3232
|
+
action: "migrate";
|
|
3233
|
+
attribution_basis: "instruction_user";
|
|
3234
|
+
mint: string;
|
|
3235
|
+
quote_mint: string;
|
|
3236
|
+
source_curve: string;
|
|
3237
|
+
destination_pool: string;
|
|
3238
|
+
launchpad: "pumpfun";
|
|
3239
|
+
destination_venue: "pumpswap";
|
|
3240
|
+
}
|
|
3241
|
+
/** Protocol-specific schedule encoded by an `early:locks` create instruction. */
|
|
3242
|
+
export type EarlyLockSchedule = {
|
|
3243
|
+
start_time: string;
|
|
3244
|
+
period_seconds: string;
|
|
3245
|
+
amount_per_period_raw: string;
|
|
3246
|
+
cliff_time: string;
|
|
3247
|
+
cliff_amount_raw: string;
|
|
3248
|
+
number_of_periods?: string;
|
|
3249
|
+
} | {
|
|
3250
|
+
releases: {
|
|
3251
|
+
release_time: string;
|
|
3252
|
+
amount_raw: string;
|
|
3253
|
+
}[];
|
|
3254
|
+
};
|
|
3255
|
+
export interface EarlyLockObservationData extends EarlyObservationBase {
|
|
3256
|
+
channel: "early:locks";
|
|
3257
|
+
decoder_version: "channels-1";
|
|
3258
|
+
protocol: "streamflow" | "jupiter_lock" | "bonfida";
|
|
3259
|
+
instruction: "create" | "create_vesting_escrow" | "create_vesting_escrow_v2";
|
|
3260
|
+
action: "create_lock";
|
|
3261
|
+
actor: string;
|
|
3262
|
+
sender: string;
|
|
3263
|
+
recipient: string | null;
|
|
3264
|
+
lock_account: string;
|
|
3265
|
+
mint: string | null;
|
|
3266
|
+
lock_kind: "stream_or_vesting" | "token_vesting";
|
|
3267
|
+
attribution_basis: "instruction_sender" | "instruction_source_owner";
|
|
3268
|
+
requested_amount_raw: string | null;
|
|
3269
|
+
schedule: EarlyLockSchedule;
|
|
3270
|
+
sender_token_account?: string;
|
|
3271
|
+
destination_token_account?: string;
|
|
3272
|
+
cancelable_by_sender?: boolean;
|
|
3273
|
+
cancelable_by_recipient?: boolean;
|
|
3274
|
+
update_recipient_mode?: number;
|
|
3275
|
+
cancel_mode?: number;
|
|
3276
|
+
missing_fields?: string[];
|
|
3277
|
+
}
|
|
3278
|
+
export interface EarlyTokenAmountChangeObservationData extends EarlyObservationBase {
|
|
3279
|
+
channel: "early:token_changes";
|
|
3280
|
+
decoder_version: "channels-1";
|
|
3281
|
+
protocol: "spl_token" | "token_2022";
|
|
3282
|
+
instruction: "mint_to" | "mint_to_checked" | "burn" | "burn_checked";
|
|
3283
|
+
action: "mint" | "burn";
|
|
3284
|
+
attribution_basis: "instruction_authority";
|
|
3285
|
+
authority: string;
|
|
3286
|
+
authority_is_signer: boolean;
|
|
3287
|
+
mint: string;
|
|
3288
|
+
token_account: string;
|
|
3289
|
+
requested_amount_raw: string;
|
|
3290
|
+
decimals: number | null;
|
|
3291
|
+
}
|
|
3292
|
+
export interface EarlyTokenFreezeObservationData extends EarlyObservationBase {
|
|
3293
|
+
channel: "early:token_changes";
|
|
3294
|
+
decoder_version: "channels-1";
|
|
3295
|
+
protocol: "spl_token" | "token_2022";
|
|
3296
|
+
instruction: "freeze" | "thaw";
|
|
3297
|
+
action: "freeze" | "thaw";
|
|
3298
|
+
attribution_basis: "instruction_authority";
|
|
3299
|
+
authority: string;
|
|
3300
|
+
authority_is_signer: boolean;
|
|
3301
|
+
mint: string;
|
|
3302
|
+
token_account: string;
|
|
3303
|
+
target_scope: "token_account";
|
|
3304
|
+
}
|
|
3305
|
+
export interface EarlyTokenAuthorityObservationData extends EarlyObservationBase {
|
|
3306
|
+
channel: "early:token_changes";
|
|
3307
|
+
decoder_version: "channels-1";
|
|
3308
|
+
protocol: "spl_token" | "token_2022";
|
|
3309
|
+
instruction: "set_authority";
|
|
3310
|
+
action: "set_authority";
|
|
3311
|
+
attribution_basis: "instruction_authority";
|
|
3312
|
+
authority: string;
|
|
3313
|
+
authority_is_signer: boolean;
|
|
3314
|
+
authority_type: "mint_tokens" | "freeze_account" | "account_owner" | "close_account";
|
|
3315
|
+
target_scope: "mint" | "token_account";
|
|
3316
|
+
target_account: string;
|
|
3317
|
+
mint: string | null;
|
|
3318
|
+
token_account: string | null;
|
|
3319
|
+
new_authority: string | null;
|
|
3320
|
+
authority_revocation_requested: boolean;
|
|
3321
|
+
missing_fields: string[];
|
|
3322
|
+
}
|
|
3323
|
+
export type EarlyTokenChangeObservationData = EarlyTokenAmountChangeObservationData | EarlyTokenFreezeObservationData | EarlyTokenAuthorityObservationData;
|
|
3324
|
+
export type EarlyObservationData = EarlyDeployObservationData | EarlyLockObservationData | EarlyTradeObservationData | EarlyLiquidityObservationData | EarlyMigrationObservationData | EarlyTokenChangeObservationData;
|
|
3325
|
+
/** Outcome repeats the original observation fields and adds execution evidence. */
|
|
3326
|
+
export type EarlyOutcomeData = Omit<EarlyObservationData, "observation_stage" | "execution_status" | "event_id"> & {
|
|
3327
|
+
event_id: string;
|
|
3328
|
+
observed_event_id: string;
|
|
3329
|
+
observation_stage: "outcome";
|
|
3330
|
+
execution_status: "succeeded" | "failed" | "unresolved";
|
|
3331
|
+
/** Evidence source: "kaldera_rpc" (status lookup: deploys and the fallback) or "kaldera_status_stream" (pushed
|
|
3332
|
+
* finalized status, the five non-deploy channels); null without evidence. Treat unknown values as a valid source. */
|
|
3333
|
+
outcome_source: "kaldera_rpc" | "kaldera_status_stream" | (string & {}) | null;
|
|
3334
|
+
outcome_at: string;
|
|
3335
|
+
commitment: "processed" | "confirmed" | "finalized" | null;
|
|
3336
|
+
slot?: string;
|
|
3337
|
+
error?: unknown;
|
|
3338
|
+
resolution_status?: "unresolved";
|
|
3339
|
+
reason?: "finalization_timeout" | "outcome_timeout";
|
|
3340
|
+
last_observed_outcome?: Record<string, unknown> | null;
|
|
3341
|
+
};
|
|
3342
|
+
export interface EarlyStreamFilters {
|
|
3343
|
+
mints?: string[];
|
|
3344
|
+
/** Instruction actor, not any account/fee payer. Do not combine with actors. */
|
|
3345
|
+
wallets?: string[];
|
|
3346
|
+
actors?: string[];
|
|
3347
|
+
launchpads?: ("pumpfun" | "launchlab")[];
|
|
3348
|
+
protocols?: string[];
|
|
3349
|
+
actions?: string[];
|
|
3350
|
+
/** Both directions and wallet_labels require a trade-only subscription. */
|
|
3351
|
+
directions?: ("buy" | "sell")[];
|
|
3352
|
+
wallet_labels?: ("kol" | "dev" | "alpha")[];
|
|
3353
|
+
/** Maximum four rules, combined with AND. Unknown/missing amount or mint fails the filter. */
|
|
3354
|
+
amounts?: EarlyAmountFilter[];
|
|
3355
|
+
}
|
|
3356
|
+
export interface EarlyWalletList {
|
|
3357
|
+
id: string;
|
|
3358
|
+
name: string;
|
|
3359
|
+
wallets: string[];
|
|
3360
|
+
revision: string;
|
|
3361
|
+
updated_at: string;
|
|
3362
|
+
}
|
|
3363
|
+
export type EarlyWalletListSummary = Omit<EarlyWalletList, 'wallets'> & {
|
|
3364
|
+
wallet_count: number;
|
|
3365
|
+
};
|
|
3366
|
+
export type EarlyWalletListControl = {
|
|
3367
|
+
op: 'list';
|
|
3368
|
+
} | {
|
|
3369
|
+
op: 'get';
|
|
3370
|
+
id: string;
|
|
3371
|
+
} | {
|
|
3372
|
+
op: 'create';
|
|
3373
|
+
name: string;
|
|
3374
|
+
wallets: string[];
|
|
3375
|
+
} | {
|
|
3376
|
+
op: 'replace';
|
|
3377
|
+
id: string;
|
|
3378
|
+
revision: string;
|
|
3379
|
+
name: string;
|
|
3380
|
+
wallets: string[];
|
|
3381
|
+
} | {
|
|
3382
|
+
op: 'delete';
|
|
3383
|
+
id: string;
|
|
3384
|
+
revision: string;
|
|
3385
|
+
};
|
|
3386
|
+
export interface EarlyWalletListResult {
|
|
3387
|
+
type: 'wallet_list_result';
|
|
3388
|
+
op: EarlyWalletListControl['op'];
|
|
3389
|
+
lists?: (EarlyWalletList | EarlyWalletListSummary)[];
|
|
3390
|
+
list?: EarlyWalletList | {
|
|
3391
|
+
id: string;
|
|
3392
|
+
deleted: true;
|
|
3393
|
+
revision: string;
|
|
3394
|
+
};
|
|
3395
|
+
limits: {
|
|
3396
|
+
lists: number;
|
|
3397
|
+
wallets: number;
|
|
3398
|
+
};
|
|
3399
|
+
}
|
|
3400
|
+
export interface EarlySubscribeControl {
|
|
3401
|
+
type: "subscribe";
|
|
3402
|
+
sub_id?: string;
|
|
3403
|
+
/** Owner-scoped saved wallet list; trade-only and mutually exclusive with wallets/actors. */
|
|
3404
|
+
wallet_list?: string | null;
|
|
3405
|
+
channels: EarlyChannel[];
|
|
3406
|
+
filters?: EarlyStreamFilters;
|
|
3407
|
+
format?: EarlyEventFormat;
|
|
3408
|
+
resume?: {
|
|
3409
|
+
instance: string;
|
|
3410
|
+
seq: number;
|
|
3411
|
+
};
|
|
3412
|
+
}
|
|
3413
|
+
export interface EarlyUpdateControl {
|
|
3414
|
+
wallet_list?: string | null;
|
|
3415
|
+
type: "update";
|
|
3416
|
+
sub_id?: string;
|
|
3417
|
+
/** Omit to preserve existing filters; {} explicitly clears them. */
|
|
3418
|
+
filters?: EarlyStreamFilters;
|
|
3419
|
+
format?: EarlyEventFormat;
|
|
3420
|
+
}
|
|
3088
3421
|
export interface SniperRecentParams {
|
|
3089
3422
|
/** Only deploys detected after this ISO-8601 timestamp. */
|
|
3090
3423
|
since?: string;
|
|
@@ -3207,6 +3540,10 @@ export interface TokenDepthQuote {
|
|
|
3207
3540
|
* (partial fill reported) | "exceeds_loaded_bins" | "price_out_of_range" (numbers null).
|
|
3208
3541
|
*/
|
|
3209
3542
|
status?: "filled" | "pool_liquidity_exhausted" | "exceeds_loaded_bins" | "exceeds_loaded_ticks" | "price_out_of_range";
|
|
3543
|
+
/** Concentrated models only: true = this size fills completely inside the loaded window; false = no usable quote for this size. */
|
|
3544
|
+
available?: boolean;
|
|
3545
|
+
/** Meteora DLMM, unavailable sizes only: SOL input (incl. fees) the loaded bins can absorb. null when available. */
|
|
3546
|
+
fillable_up_to_sol?: number | null;
|
|
3210
3547
|
/** Tokens received for that buy (UI units, fee-adjusted). null only on a concentrated pool whose status is not quotable. */
|
|
3211
3548
|
tokens_out: number | null;
|
|
3212
3549
|
/** Average execution price in SOL per token. */
|
|
@@ -3216,7 +3553,7 @@ export interface TokenDepthQuote {
|
|
|
3216
3553
|
}
|
|
3217
3554
|
/** SOL required to move the pool's spot price by 1% / 5% / 10%. */
|
|
3218
3555
|
export interface TokenDepthToMovePrice {
|
|
3219
|
-
/** null on a concentrated pool when the loaded window does not reach that price. */
|
|
3556
|
+
/** null on a concentrated pool when the loaded window does not reach that price, or when no liquidity lies between the current and target price (never 0). */
|
|
3220
3557
|
"1pct": number | null;
|
|
3221
3558
|
"5pct": number | null;
|
|
3222
3559
|
"10pct": number | null;
|
|
@@ -3274,6 +3611,8 @@ export interface TokenDepthPool extends TokenDepthPoolBase {
|
|
|
3274
3611
|
* "reserves_unavailable". */
|
|
3275
3612
|
export interface TokenDepthUnsupportedPool extends TokenDepthPoolBase {
|
|
3276
3613
|
reason: string;
|
|
3614
|
+
/** With reason "dlmm_insufficient_liquidity_in_loaded_bins": SOL input (incl. fees) the loaded bins can absorb (0 = no buy-side liquidity). */
|
|
3615
|
+
fillable_up_to_sol?: number;
|
|
3277
3616
|
}
|
|
3278
3617
|
/**
|
|
3279
3618
|
* v1.22 — Per-pool price-impact / slippage for a token: "how much SOL to move
|
|
@@ -3602,6 +3941,71 @@ export interface TokenLocksSummary {
|
|
|
3602
3941
|
/** Active contracts the sender can still cancel (pull the funds back). */
|
|
3603
3942
|
active_cancelable_by_sender: number;
|
|
3604
3943
|
}
|
|
3944
|
+
/** Panels a terminal can ask for. There is no default set: name every module you render. */
|
|
3945
|
+
export type TokenIntelligenceModuleId = "snapshot" | "risk" | "buyer_quality" | "holders" | "flow" | "kol" | "locks" | "top_traders";
|
|
3946
|
+
/** Per-module outcome; a non-ready module never carries `data` (a failure is never a zero). */
|
|
3947
|
+
export type TokenIntelligenceModuleStatus = "ready" | "partial_history" | "unverified" | "unavailable" | "timeout";
|
|
3948
|
+
/** Query params for GET /tokens/{mint}/intelligence (and the RHC twin). */
|
|
3949
|
+
export interface TokenIntelligenceParams {
|
|
3950
|
+
/**
|
|
3951
|
+
* Required. Modules as an array or a comma-separated string. Budget: at most
|
|
3952
|
+
* 5 modules and total cost 8 (snapshot 2, risk 2, buyer_quality 2, holders 3,
|
|
3953
|
+
* flow 3, kol 1, locks 1, top_traders 2); over budget is HTTP 400
|
|
3954
|
+
* `include_budget_exceeded` before any read. `holders` is opt-in only.
|
|
3955
|
+
*/
|
|
3956
|
+
include: readonly TokenIntelligenceModuleId[] | string;
|
|
3957
|
+
}
|
|
3958
|
+
export interface TokenIntelligenceHistoricalCompleteness {
|
|
3959
|
+
threshold: "verified_interval";
|
|
3960
|
+
observed: "verified" | "not_verified" | "unknown";
|
|
3961
|
+
threshold_met: boolean;
|
|
3962
|
+
}
|
|
3963
|
+
export interface TokenIntelligenceModule {
|
|
3964
|
+
status: TokenIntelligenceModuleStatus;
|
|
3965
|
+
/** Machine reason for any non-ready status (tier_required, not_found, module_timeout, request_deadline, history_not_verified, not_captured, source_error, ...). */
|
|
3966
|
+
reason: string | null;
|
|
3967
|
+
/** The source's own timestamp; null when the source gives none. Never the request time. */
|
|
3968
|
+
as_of: string | null;
|
|
3969
|
+
provenance: {
|
|
3970
|
+
source: string;
|
|
3971
|
+
chain: string;
|
|
3972
|
+
upstream_status: number | null;
|
|
3973
|
+
cache: "hit" | "miss" | "none";
|
|
3974
|
+
};
|
|
3975
|
+
coverage: {
|
|
3976
|
+
kind: "point_in_time" | "trade_derived";
|
|
3977
|
+
historical_completeness: TokenIntelligenceHistoricalCompleteness | null;
|
|
3978
|
+
};
|
|
3979
|
+
limitations: string[];
|
|
3980
|
+
/** The source endpoint's own body. Absent when unavailable / timed out. */
|
|
3981
|
+
data?: Record<string, unknown>;
|
|
3982
|
+
}
|
|
3983
|
+
export interface TokenIntelligenceBudget {
|
|
3984
|
+
cost_used: number;
|
|
3985
|
+
cost_limit: number;
|
|
3986
|
+
max_modules: number;
|
|
3987
|
+
source_reads: number;
|
|
3988
|
+
module_timeout_ms: number;
|
|
3989
|
+
request_deadline_ms: number;
|
|
3990
|
+
concurrency: number;
|
|
3991
|
+
}
|
|
3992
|
+
/** GET /tokens/{mint}/intelligence — Solana, base58, SOL-native. */
|
|
3993
|
+
export interface TokenIntelligenceResponse {
|
|
3994
|
+
contract_version: 1;
|
|
3995
|
+
chain: "solana";
|
|
3996
|
+
chain_id: null;
|
|
3997
|
+
/** Base58 mint as requested. */
|
|
3998
|
+
address: string;
|
|
3999
|
+
address_format: "base58";
|
|
4000
|
+
native_asset: "SOL";
|
|
4001
|
+
requested: TokenIntelligenceModuleId[];
|
|
4002
|
+
/** Response assembly time, NOT an observation time (each module has its own `as_of`). */
|
|
4003
|
+
generated_at: string;
|
|
4004
|
+
budget: TokenIntelligenceBudget;
|
|
4005
|
+
summary: Record<TokenIntelligenceModuleStatus, number>;
|
|
4006
|
+
/** Only the requested modules are present. */
|
|
4007
|
+
modules: Partial<Record<TokenIntelligenceModuleId, TokenIntelligenceModule>>;
|
|
4008
|
+
}
|
|
3605
4009
|
/** Query params for GET /tokens/{mint}/locks. */
|
|
3606
4010
|
export interface TokenLocksParams {
|
|
3607
4011
|
/** Filter the list (the summary always covers all rows). */
|
|
@@ -4710,7 +5114,7 @@ export interface DeployerRewardsResponse {
|
|
|
4710
5114
|
note: string;
|
|
4711
5115
|
};
|
|
4712
5116
|
}
|
|
4713
|
-
export type DeployerActivityEventType = "launch" | "dev_buy" | "dev_sell" | "creator_transferred" | "fee_claim" | "funding_in" | "capital_out";
|
|
5117
|
+
export type DeployerActivityEventType = "launch" | "dev_buy" | "dev_sell" | "dev_token_transfer_out" | "dev_token_transfer_in" | "creator_transferred" | "fee_claim" | "funding_in" | "capital_out";
|
|
4714
5118
|
/**
|
|
4715
5119
|
* One event of a deployer's activity timeline. Fields present depend on
|
|
4716
5120
|
* `type`; addresses are raw facts of the concrete event, never identity claims.
|
|
@@ -4736,6 +5140,18 @@ export interface DeployerActivityEvent {
|
|
|
4736
5140
|
sol?: number | null;
|
|
4737
5141
|
tokens?: number | null;
|
|
4738
5142
|
price_usd?: number | null;
|
|
5143
|
+
/** Realtime dev-event actor. PRO sees only direct developer events; ULTRA+ may also see proven linked-wallet events when identity stitching is released. */
|
|
5144
|
+
actor_wallet?: string | null;
|
|
5145
|
+
actor_role?: "deployer" | "linked_wallet" | null;
|
|
5146
|
+
/** Exact base-unit amount on persisted realtime dev events. */
|
|
5147
|
+
token_amount_raw?: string | null;
|
|
5148
|
+
supply_pct?: number | null;
|
|
5149
|
+
venue?: string | null;
|
|
5150
|
+
/** Raw transfer counterparty; never an identity claim. */
|
|
5151
|
+
counterparty?: string | null;
|
|
5152
|
+
counterparty_class?: string | null;
|
|
5153
|
+
/** Timeline source/projection marker for realtime dev events. */
|
|
5154
|
+
feed?: string | null;
|
|
4739
5155
|
first_at?: string | null;
|
|
4740
5156
|
last_at?: string | null;
|
|
4741
5157
|
aggregate?: boolean;
|
|
@@ -4756,7 +5172,7 @@ export interface DeployerActivityEvent {
|
|
|
4756
5172
|
first_tx?: string | null;
|
|
4757
5173
|
/** Developer token transfers: number of counterparties of this (tx, mint, direction, actor) aggregate; null on rows stored before 2026-10-06. */
|
|
4758
5174
|
counterparty_count?: number | null;
|
|
4759
|
-
/** Developer token transfers: true when
|
|
5175
|
+
/** Developer token transfers: true when recovered into history after a delivery gap (never delivered live). `time_basis` says the clock: chain (re-derived from a block) or ingest (spool replay keeps the receive time). */
|
|
4760
5176
|
recovered?: boolean;
|
|
4761
5177
|
/** With `recovered: true`: when the recovery stored the event. */
|
|
4762
5178
|
recovered_at?: string | null;
|
|
@@ -4915,7 +5331,7 @@ export interface DeployerActivityParams {
|
|
|
4915
5331
|
cursor?: string;
|
|
4916
5332
|
/** Requested window start (ISO 8601); clamped to the plan window. */
|
|
4917
5333
|
since?: string;
|
|
4918
|
-
/** Comma
|
|
5334
|
+
/** Comma-separated event types. */
|
|
4919
5335
|
types?: string;
|
|
4920
5336
|
}
|
|
4921
5337
|
/** Reputation grade — the deployers.tier CHECK set (migration 031). `unranked` = too few deploys to grade, not "bad". (Earlier types listed "neutral" / "spammer", which are Robinhood Chain tiers and never appear here.) */
|