@toon-protocol/client 0.14.11 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -508,6 +508,35 @@ interface RequestBlobStorageResult {
508
508
  * @returns `{ success, txId?, eventId?, error? }`.
509
509
  */
510
510
  declare function requestBlobStorage(client: ToonClient, secretKey: Uint8Array, params: RequestBlobStorageParams): Promise<RequestBlobStorageResult>;
511
+ /**
512
+ * Extract the Arweave tx ID from the FULFILL `data` of a successful blob upload.
513
+ *
514
+ * The deployed payment-proxy returns the DVM's verbatim HTTP/1.1 response inside
515
+ * the FULFILL `data`. For a successful single-packet upload that response is:
516
+ *
517
+ * HTTP/1.1 200 OK\r\n
518
+ * content-length: 189\r\n
519
+ * \r\n
520
+ * {"accept":true,"txId":"<43-char base64url>","data":"<base64 of txId>",...}
521
+ *
522
+ * We parse the HTTP envelope, fail on a non-2xx status or `accept:false`, then
523
+ * read `txId` (preferred) from the JSON body — falling back to base64-decoding
524
+ * the `data` field when `txId` is absent.
525
+ *
526
+ * LEGACY FALLBACK: older / non-proxy providers returned the bare tx ID as
527
+ * `base64(utf8(txId))` directly in the FULFILL data (no HTTP envelope). When the
528
+ * payload is not HTTP-enveloped we preserve that original decode so non-HTTP
529
+ * FULFILLs do not regress.
530
+ *
531
+ * Exported for callers that drive `publishEvent` directly with a hand-built
532
+ * kind:5094 event (e.g. git-object uploads carrying Git-SHA/Git-Type/Repo
533
+ * tags, toon-client#227) and need the same FULFILL→txId decode this helper
534
+ * applies.
535
+ *
536
+ * @throws {Error} If the response is non-2xx, `accept:false`, the body is not
537
+ * parseable JSON, or no valid Arweave tx ID can be extracted.
538
+ */
539
+ declare function extractArweaveTxId(base64Data: string): string;
511
540
 
512
541
  interface BtpRuntimeClientConfig {
513
542
  btpUrl: string;
@@ -1373,6 +1402,26 @@ declare class ConnectorError extends ToonClientError {
1373
1402
  declare class ValidationError extends ToonClientError {
1374
1403
  constructor(message: string, cause?: Error);
1375
1404
  }
1405
+ /**
1406
+ * Thrown when the one-time on-chain payment-channel OPEN reverts because the
1407
+ * local settlement wallet has no native gas to pay for its own
1408
+ * approve/openChannel/setTotalDeposit transactions. This is the channel OPEN
1409
+ * only — per-write settlement rides ILP-over-HTTP and never spends gas. We
1410
+ * remap ONLY this case so callers get an actionable message (fund the wallet)
1411
+ * instead of the raw viem "...exceeds the balance of the account" string
1412
+ * (toon-meta#65). Retryable once the wallet is funded; the underlying viem/RPC
1413
+ * error is preserved as `cause`.
1414
+ */
1415
+ declare class ChannelFundingError extends ToonClientError {
1416
+ readonly retryable = true;
1417
+ constructor(message: string, cause?: Error);
1418
+ }
1419
+ /**
1420
+ * True when `err` (or any error in its nested `cause` chain) is an
1421
+ * insufficient-native-gas revert. viem wraps the node error one or more levels
1422
+ * deep, so the whole chain is flattened and scanned.
1423
+ */
1424
+ declare function isInsufficientGasError(err: unknown): boolean;
1376
1425
 
1377
1426
  /**
1378
1427
  * Configuration options for HttpRuntimeClient.
@@ -2316,14 +2365,22 @@ declare class OnChainChannelClient implements ConnectorChannelClient {
2316
2365
  */
2317
2366
  private openMinaChannel;
2318
2367
  /**
2319
- * Opens an EVM payment channel on-chain.
2368
+ * Opens an EVM payment channel on-chain, remapping the one-time
2369
+ * insufficient-native-gas revert into an actionable {@link ChannelFundingError}
2370
+ * so callers surface "fund the wallet" instead of the raw viem
2371
+ * "...exceeds the balance of the account" string (toon-meta#65). Only the gas
2372
+ * case is remapped; every other error propagates unchanged.
2373
+ */
2374
+ private openEvmChannel;
2375
+ /**
2376
+ * Raw EVM channel-open (no gas-error remapping — see {@link openEvmChannel}).
2320
2377
  *
2321
2378
  * 1. Approve token spend if needed
2322
2379
  * 2. Call TokenNetwork.openChannel()
2323
2380
  * 3. Extract channelId from ChannelOpened event
2324
2381
  * 4. Deposit initial funds if specified
2325
2382
  */
2326
- private openEvmChannel;
2383
+ private openEvmChannelUnchecked;
2327
2384
  /**
2328
2385
  * Gets the current state of a payment channel from on-chain data.
2329
2386
  */
@@ -2742,406 +2799,6 @@ declare function applyDefaults(rawConfig: ToonClientConfig): ResolvedConfig;
2742
2799
  */
2743
2800
  declare function buildSettlementInfo(rawConfig: ToonClientConfig): ClientSettlementInfo | undefined;
2744
2801
 
2745
- /**
2746
- * Pet DVM Client-Side Types
2747
- *
2748
- * Locally defined types for pet DVM interaction utilities.
2749
- * These mirror server-side types but do NOT import from @toon-protocol/pet-dvm,
2750
- * @toon-protocol/pet-circuit, or @toon-protocol/memvid-node.
2751
- *
2752
- * @module pet/types
2753
- */
2754
- /** Plain-number stat values (all clamped to [1, 100]) */
2755
- interface StatValues {
2756
- hunger: number;
2757
- happiness: number;
2758
- health: number;
2759
- hygiene: number;
2760
- energy: number;
2761
- }
2762
- /** Metadata for a pet DVM provider discovered via Kind 10035 events */
2763
- interface PetDvmProvider {
2764
- /** ILP address of the provider's connector */
2765
- ilpAddress: string;
2766
- /** Per-interaction cost from skill.pricing['5900'] */
2767
- pricing: string;
2768
- /** Provider's Nostr pubkey (cryptographically bound from event.pubkey) */
2769
- pubkey: string;
2770
- /** Feature list from skill.features */
2771
- features: string[];
2772
- }
2773
- /** Parameters for building a Kind 5900 pet interaction request */
2774
- interface PetInteractionRequestParams {
2775
- /** Blobbi identifier (non-empty string) */
2776
- blobbiId: string;
2777
- /** Action type (0-10, maps to Feed/Play/Clean/etc.) */
2778
- actionType: number;
2779
- /** Item identifier (>= 0) */
2780
- itemId: number;
2781
- /** Token cost for this interaction (>= 0) */
2782
- tokenCost: number;
2783
- /** Whether the pet is currently sleeping */
2784
- isSleeping: boolean;
2785
- }
2786
- /** Unsigned Nostr event structure compatible with nostr-tools finalizeEvent */
2787
- interface UnsignedNostrEvent {
2788
- kind: number;
2789
- created_at: number;
2790
- tags: string[][];
2791
- content: string;
2792
- }
2793
- /** Parsed result data from Kind 6900 DVM response (base64 JSON in IlpSendResult.data) */
2794
- interface PetInteractionResultData {
2795
- /** Current stat values */
2796
- stats: StatValues;
2797
- /** Current stage (0=Egg, 1=Baby, 2=Adult) */
2798
- stage: number;
2799
- /** Current evolution cycle (>= 0) */
2800
- cycle: number;
2801
- /** Unix timestamp of last interaction */
2802
- lastInteraction: number;
2803
- /** 64-char hex BLAKE3 hash of brain state */
2804
- brainHash: string;
2805
- /** Per-action-type cooldown timestamps */
2806
- cooldownTimestamps: number[];
2807
- }
2808
- /** Stat snapshot used in interaction result content */
2809
- interface InteractionResultContent {
2810
- priorStats: StatValues;
2811
- decayedStats: StatValues;
2812
- finalStats: StatValues;
2813
- cycle: number;
2814
- stage: number;
2815
- tokenCost: number;
2816
- }
2817
- /** Proof status of a Kind 14919 event */
2818
- type ProofStatus = 'optimistic' | 'proven';
2819
- /** Parameters for building a Kind 30402 pet-for-sale classified listing */
2820
- interface PetListingParams {
2821
- /** Blobbi identifier (non-empty string) — used as the 'd' tag */
2822
- blobbiId: string;
2823
- /** Asking price in USDC (> 0) */
2824
- askPriceUsdc: number;
2825
- /** 64-char hex lifecycleHash from on-chain PetZkApp state */
2826
- lifecycleHash: string;
2827
- /** Cumulative PET tokens spent (numeric string, >= "0") */
2828
- totalSpent: string;
2829
- /** Current stage: 0=Egg, 1=Baby, 2=Adult */
2830
- stage: number;
2831
- /** Current pet stats */
2832
- stats: StatValues;
2833
- /** Seller's Nostr pubkey (64-char hex) */
2834
- sellerPubkey: string;
2835
- /** Preferred relay URL for event relay routing */
2836
- relayUrl: string;
2837
- /** Listing expiry as unix timestamp */
2838
- expiresAt: number;
2839
- }
2840
- /** A parsed pet-for-sale listing (extends PetListingParams with event metadata) */
2841
- interface PetListing extends PetListingParams {
2842
- /** Nostr event ID of the kind:30402 listing event */
2843
- eventId: string;
2844
- /** Unix timestamp when the listing event was created */
2845
- createdAt: number;
2846
- }
2847
- /** Filter options for filterPetListings() */
2848
- interface PetListingFilterOptions {
2849
- /** Only include listings for pets at or above this stage */
2850
- minStage?: number;
2851
- /** Only include listings at or below this USDC price */
2852
- maxAskPriceUsdc?: number;
2853
- /** Only include listings where totalSpent >= this value (numeric string comparison) */
2854
- minTotalSpent?: string;
2855
- /** Only include listings from this seller pubkey */
2856
- sellerPubkey?: string;
2857
- }
2858
- /** Parameters for building a Kind 5900 pet purchase request (transfer-ownership) */
2859
- interface PetPurchaseRequestParams {
2860
- /** Blobbi identifier being purchased */
2861
- blobbiId: string;
2862
- /** Nostr event ID of the kind:30402 listing being purchased */
2863
- listingEventId: string;
2864
- /** Buyer's Nostr pubkey (64-char hex) */
2865
- buyerPubkey: string;
2866
- /** Token cost for the purchase (>= 0) */
2867
- tokenCost: number;
2868
- /** Seller's Nostr pubkey — ILP payment routed to this pubkey (64-char hex) */
2869
- sellerPubkey: string;
2870
- }
2871
- /** Parsed data from a Kind 14919 pet interaction event */
2872
- interface PetInteractionEventData {
2873
- /** Blobbi identifier from 'd' tag */
2874
- blobbiId: string;
2875
- /** Action type from 'action' tag */
2876
- actionType: number;
2877
- /** Item identifier from 'item' tag */
2878
- itemId: number;
2879
- /** Token cost from 'cost' tag */
2880
- tokenCost: number;
2881
- /** Evolution cycle from 'cycle' tag */
2882
- cycle: number;
2883
- /** Stage from 'stage' tag */
2884
- stage: number;
2885
- /** Brain hash from 'brain_hash' tag */
2886
- brainHash: string;
2887
- /** Proof status: 'optimistic' (no proof tag) or 'proven' (has proof + mina_tx tags) */
2888
- proofStatus: ProofStatus;
2889
- /** Parsed content JSON (stats before/after) */
2890
- content: InteractionResultContent | null;
2891
- /** Base64 proof data (only present when proven) */
2892
- proof?: string;
2893
- /** Mina transaction hash (only present when proven) */
2894
- minaTx?: string;
2895
- }
2896
-
2897
- /**
2898
- * Pet DVM Provider Discovery
2899
- *
2900
- * Filters Kind 10035 service discovery events to find providers that
2901
- * support Pet DVM interactions (Kind 5900).
2902
- *
2903
- * @module pet/filterPetDvmProviders
2904
- */
2905
-
2906
- /**
2907
- * Minimal Nostr event shape needed for filtering.
2908
- * Using a local interface to avoid importing nostr-tools types.
2909
- */
2910
- interface NostrEventLike$3 {
2911
- kind: number;
2912
- pubkey: string;
2913
- content: string;
2914
- tags: string[][];
2915
- id: string;
2916
- sig: string;
2917
- created_at: number;
2918
- }
2919
- /**
2920
- * Filter Kind 10035 service discovery events to find pet DVM providers.
2921
- *
2922
- * Accepts raw NostrEvent[] and internally parses content via parseServiceDiscovery.
2923
- * Filters events where skill.kinds includes 5900 (PET_INTERACTION_REQUEST_KIND).
2924
- * Returns provider metadata sorted by price ascending (cheapest first).
2925
- *
2926
- * Handles missing/malformed skill descriptors gracefully (returns empty array, no throw).
2927
- *
2928
- * @param events - Array of raw Nostr events (kind:10035)
2929
- * @returns Array of PetDvmProvider metadata, sorted by price ascending
2930
- */
2931
- declare function filterPetDvmProviders(events: NostrEventLike$3[]): PetDvmProvider[];
2932
-
2933
- /**
2934
- * Pet Interaction Request Builder (Kind 5900)
2935
- *
2936
- * Builds unsigned Kind 5900 Nostr events for pet DVM interaction requests.
2937
- * Compatible with nostr-tools/pure finalizeEvent for signing.
2938
- *
2939
- * @module pet/buildPetInteractionRequest
2940
- */
2941
-
2942
- /**
2943
- * Build an unsigned Kind 5900 pet interaction request event.
2944
- *
2945
- * All tag values are stringified per Nostr protocol convention.
2946
- * The returned event is compatible with nostr-tools `finalizeEvent`.
2947
- *
2948
- * @param params - Typed interaction parameters
2949
- * @returns Unsigned Nostr event ready for signing
2950
- * @throws ValidationError for invalid input
2951
- */
2952
- declare function buildPetInteractionRequest(params: PetInteractionRequestParams): UnsignedNostrEvent;
2953
-
2954
- /**
2955
- * Pet Interaction Result Parser (Kind 6900)
2956
- *
2957
- * Decodes base64-encoded JSON from IlpSendResult.data field.
2958
- * Uses browser-safe atob() -- NOT Node.js Buffer -- for ditto React SPA compatibility.
2959
- *
2960
- * @module pet/parsePetInteractionResult
2961
- */
2962
-
2963
- /**
2964
- * Parse base64-encoded JSON result data from a Kind 6900 DVM response.
2965
- *
2966
- * Uses atob() for browser compatibility (ditto React SPA).
2967
- * Returns null for malformed/missing data (no throw).
2968
- *
2969
- * Validates:
2970
- * - brainHash is 64-char hex
2971
- * - stats has all 5 fields
2972
- * - cycle >= 0
2973
- * - stage 0-2
2974
- *
2975
- * @param data - Base64-encoded JSON string from IlpSendResult.data
2976
- * @returns Parsed PetInteractionResultData or null if invalid
2977
- */
2978
- declare function parsePetInteractionResult(data: string): PetInteractionResultData | null;
2979
-
2980
- /**
2981
- * Pet Interaction Event Parser (Kind 14919)
2982
- *
2983
- * Parses Kind 14919 optimistic/proven pet interaction events.
2984
- * Detects proof status from presence of 'proof' + 'mina_tx' tags.
2985
- *
2986
- * @module pet/parsePetInteractionEvent
2987
- */
2988
-
2989
- /**
2990
- * Minimal Nostr event shape needed for parsing.
2991
- */
2992
- interface NostrEventLike$2 {
2993
- kind: number;
2994
- pubkey: string;
2995
- content: string;
2996
- tags: string[][];
2997
- id: string;
2998
- sig: string;
2999
- created_at: number;
3000
- }
3001
- /**
3002
- * Parse a Kind 14919 pet interaction event.
3003
- *
3004
- * Extracts all tag values and detects proof status:
3005
- * - 'optimistic': no 'proof' tag
3006
- * - 'proven': has 'proof' + 'mina_tx' tags
3007
- *
3008
- * Returns null if required tags are missing.
3009
- *
3010
- * @param event - A Nostr event (Kind 14919)
3011
- * @returns Parsed PetInteractionEventData or null if malformed
3012
- */
3013
- declare function parsePetInteractionEvent(event: NostrEventLike$2): PetInteractionEventData | null;
3014
-
3015
- /**
3016
- * Pet Listing Event Builder (Kind 30402)
3017
- *
3018
- * Builds unsigned Kind 30402 (NIP-99 classified listing) Nostr events
3019
- * for pet-for-sale marketplace listings. Every listing includes a
3020
- * verified biography attachment (lifecycleHash + totalSpent) so buyers
3021
- * can verify the listing against on-chain PetZkApp state.
3022
- *
3023
- * Browser-compatible — no Node.js-only imports.
3024
- *
3025
- * @module pet/buildPetListingEvent
3026
- */
3027
-
3028
- /**
3029
- * Build an unsigned Kind 30402 pet-for-sale classified listing event.
3030
- *
3031
- * The listing uses the NIP-99 classified listing format with TOON-specific
3032
- * extension tags for verified biography (lifecycleHash, totalSpent).
3033
- * The `d` tag is set to `blobbiId` for stable parameterized replaceability —
3034
- * republishing with the same `d` tag updates the listing on relays.
3035
- *
3036
- * The returned event is compatible with nostr-tools `finalizeEvent`.
3037
- *
3038
- * @param params - Typed listing parameters
3039
- * @returns Unsigned Nostr event ready for signing and publishing
3040
- */
3041
- declare function buildPetListingEvent(params: PetListingParams): UnsignedNostrEvent;
3042
-
3043
- /**
3044
- * Pet Listing Parser (Kind 30402)
3045
- *
3046
- * Parses Kind 30402 (NIP-99 classified listing) Nostr events into
3047
- * typed PetListing objects. Returns null for invalid or malformed events.
3048
- *
3049
- * Browser-compatible — no Node.js-only imports.
3050
- *
3051
- * @module pet/parsePetListing
3052
- */
3053
-
3054
- /** Minimal Nostr event shape required for parsing */
3055
- interface NostrEventLike$1 {
3056
- id: string;
3057
- kind: number;
3058
- pubkey: string;
3059
- tags: string[][];
3060
- content: string;
3061
- created_at: number;
3062
- }
3063
- /**
3064
- * Parse a Kind 30402 pet classified listing event into a PetListing.
3065
- *
3066
- * Validation rules:
3067
- * - event.kind must be 30402
3068
- * - 'd' tag must be present and non-empty
3069
- * - 'price' tag must be present with a valid positive numeric first element
3070
- * - 'lifecycle_hash' tag must be a 64-char hex string
3071
- * - 'total_spent' tag must be a valid non-negative numeric string
3072
- * - 'stage' tag must be present
3073
- *
3074
- * Stats are parsed from content JSON; unparseable content falls back to DEFAULT_STATS.
3075
- *
3076
- * @param event - A Nostr event (expected Kind 30402)
3077
- * @returns Parsed PetListing or null if invalid
3078
- */
3079
- declare function parsePetListing(event: NostrEventLike$1): PetListing | null;
3080
-
3081
- /**
3082
- * Pet Listing Discovery Filter
3083
- *
3084
- * Filters and sorts Kind 30402 pet marketplace listing events into
3085
- * typed PetListing objects. Handles expiry, stage, price, biography
3086
- * value, and seller filtering. Results sorted by totalSpent descending
3087
- * (highest biography value first) to surface the most battle-hardened pets.
3088
- *
3089
- * Browser-compatible — no Node.js-only imports.
3090
- *
3091
- * @module pet/filterPetListings
3092
- */
3093
-
3094
- /** Minimal Nostr event shape accepted by the filter */
3095
- interface NostrEventLike {
3096
- id: string;
3097
- kind: number;
3098
- pubkey: string;
3099
- tags: string[][];
3100
- content: string;
3101
- created_at: number;
3102
- }
3103
- /**
3104
- * Filter and sort Kind 30402 pet marketplace listing events.
3105
- *
3106
- * Parsing is done via parsePetListing — invalid events are silently dropped.
3107
- * Expired listings (expiration tag < current unix time) are excluded.
3108
- * Options allow additional filtering by stage, price, biography value, and seller.
3109
- * Results are sorted by totalSpent descending (highest biography value first).
3110
- *
3111
- * @param events - Array of raw Nostr events to filter
3112
- * @param options - Optional filter criteria
3113
- * @returns Filtered and sorted array of PetListing objects
3114
- */
3115
- declare function filterPetListings(events: NostrEventLike[], options?: PetListingFilterOptions): PetListing[];
3116
-
3117
- /**
3118
- * Pet Purchase Request Builder (Kind 5900, action type 9)
3119
- *
3120
- * Builds unsigned Kind 5900 Nostr events for pet transfer-ownership
3121
- * purchase requests. Action type 9 is a reserved slot in the pet DVM
3122
- * protocol — this event signals purchase intent and routes ILP payment
3123
- * to the seller. The actual Mina on-chain ownership transfer (PetZkApp
3124
- * .transferOperator) is handled by downstream stories.
3125
- *
3126
- * Browser-compatible — no Node.js-only imports.
3127
- *
3128
- * @module pet/buildPetPurchaseRequest
3129
- */
3130
-
3131
- /**
3132
- * Build an unsigned Kind 5900 pet purchase request event.
3133
- *
3134
- * Reuses the existing pet interaction event kind (5900) with action type 9
3135
- * (transfer-ownership). The `listing` tag references the kind:30402 listing
3136
- * event being purchased. The `p` tag routes ILP payment to the seller.
3137
- *
3138
- * The returned event is compatible with nostr-tools `finalizeEvent`.
3139
- *
3140
- * @param params - Typed purchase request parameters
3141
- * @returns Unsigned Nostr event ready for signing and publishing
3142
- */
3143
- declare function buildPetPurchaseRequest(params: PetPurchaseRequestParams): UnsignedNostrEvent;
3144
-
3145
2802
  /**
3146
2803
  * Devnet faucet helper.
3147
2804
  *
@@ -3551,4 +3208,4 @@ declare function loadKeystore(path: string, password: string): string;
3551
3208
  */
3552
3209
  declare function writeKeystoreFile(path: string, keystore: EncryptedKeystore): void;
3553
3210
 
3554
- export { type BackupPayload, type BalanceProofParams, BtpRuntimeClient, type BtpRuntimeClientConfig, type ChainMetadata, type ChainSigner, ChannelManager, type ClaimMessage, type ClaimResolver, ConnectorError, type DiscoveredIlpPeer, type EVMClaimMessage, type EncryptedKeystore, EvmSigner, type FaucetChain, type FundWalletOptions, type FundWalletResult, type H402FetchOptions, Http402Client, type Http402ClientConfig, HttpConnectorAdmin, type HttpConnectorAdminConfig, HttpIlpClient, type HttpIlpClientConfig, type HttpIlpClientFactory, HttpRuntimeClient, type HttpRuntimeClientConfig, ILP_CLAIM_HEADER, ILP_CLAIM_WRAPPED_HEADER, ILP_PEER_ID_HEADER, type IlpTransportChoice, type InteractionResultContent, KeyManager, type KeyManagerConfig, type MinaClaimMessage, type MinaDepositReader, MinaSigner, type MinaSignerOptions, NetworkError, OnChainChannelClient, type OnChainChannelClientConfig, type ParsedFulfillHttp, type ParsedX402Challenge, type PasskeyInfo, type PetDvmProvider, type PetInteractionEventData, type PetInteractionRequestParams, type PetInteractionResultData, type PetListing, type PetListingFilterOptions, type PetListingParams, type PetPurchaseRequestParams, type ProofStatus, type PublishEventResult, type RequestBlobStorageParams, type RequestBlobStorageResult, type RetryOptions, type SelectIlpTransportOptions, type SignedBalanceProof, type SolanaChannelClientOptions, type SolanaClaimMessage, SolanaSigner, type StatValues, type ToonChannelAccept, ToonClient, type ToonClientConfig, ToonClientError, type ToonIdentity, type ToonSigners, type ToonStartResult, type UnsignedNostrEvent, ValidationError, type VaultData, applyDefaults, applyNetworkPresets, buildBackupEvent, buildBackupFilter, buildPetInteractionRequest, buildPetListingEvent, buildPetPurchaseRequest, buildSettlementInfo, buildStoreWriteEnvelope, decryptMnemonic, defaultFaucetTimeout, deriveFromNsec, deriveFullIdentity, deriveNostrKeyFromMnemonic, encryptMnemonic, filterPetDvmProviders, filterPetListings, fundWallet, generateKeystore, generateMnemonic, generateRandomIdentity, getNetworkStatus, httpEndpointToBtpUrl, importKeystore, isPrfSupported, loadKeystore, parseBackupPayload, parseFulfillHttp, parseFulfillHttpBytes, parseHttpResponse, parsePetInteractionEvent, parsePetInteractionResult, parsePetListing, parseX402Body, parseX402Challenge, proxyIlpEndpoint, readDiscoveredIlpPeer, readMinaDepositTotal, requestBlobStorage, selectIlpTransport, serializeHttpRequest, validateConfig, validateMnemonic, withRetry, writeKeystoreFile };
3211
+ export { type BackupPayload, type BalanceProofParams, BtpRuntimeClient, type BtpRuntimeClientConfig, type ChainMetadata, type ChainSigner, ChannelFundingError, ChannelManager, type ClaimMessage, type ClaimResolver, ConnectorError, type DiscoveredIlpPeer, type EVMClaimMessage, type EncryptedKeystore, EvmSigner, type FaucetChain, type FundWalletOptions, type FundWalletResult, type H402FetchOptions, Http402Client, type Http402ClientConfig, HttpConnectorAdmin, type HttpConnectorAdminConfig, HttpIlpClient, type HttpIlpClientConfig, type HttpIlpClientFactory, HttpRuntimeClient, type HttpRuntimeClientConfig, ILP_CLAIM_HEADER, ILP_CLAIM_WRAPPED_HEADER, ILP_PEER_ID_HEADER, type IlpTransportChoice, KeyManager, type KeyManagerConfig, type MinaClaimMessage, type MinaDepositReader, MinaSigner, type MinaSignerOptions, NetworkError, OnChainChannelClient, type OnChainChannelClientConfig, type ParsedFulfillHttp, type ParsedX402Challenge, type PasskeyInfo, type PublishEventResult, type RequestBlobStorageParams, type RequestBlobStorageResult, type RetryOptions, type SelectIlpTransportOptions, type SignedBalanceProof, type SolanaChannelClientOptions, type SolanaClaimMessage, SolanaSigner, type ToonChannelAccept, ToonClient, type ToonClientConfig, ToonClientError, type ToonIdentity, type ToonSigners, type ToonStartResult, ValidationError, type VaultData, applyDefaults, applyNetworkPresets, buildBackupEvent, buildBackupFilter, buildSettlementInfo, buildStoreWriteEnvelope, decryptMnemonic, defaultFaucetTimeout, deriveFromNsec, deriveFullIdentity, deriveNostrKeyFromMnemonic, encryptMnemonic, extractArweaveTxId, fundWallet, generateKeystore, generateMnemonic, generateRandomIdentity, getNetworkStatus, httpEndpointToBtpUrl, importKeystore, isInsufficientGasError, isPrfSupported, loadKeystore, parseBackupPayload, parseFulfillHttp, parseFulfillHttpBytes, parseHttpResponse, parseX402Body, parseX402Challenge, proxyIlpEndpoint, readDiscoveredIlpPeer, readMinaDepositTotal, requestBlobStorage, selectIlpTransport, serializeHttpRequest, validateConfig, validateMnemonic, withRetry, writeKeystoreFile };