@ember-finance/sdk 2.37.0 → 2.39.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.
Files changed (36) hide show
  1. package/dist/src/api/apis/vaults-api.d.ts +0 -68
  2. package/dist/src/api/apis/vaults-api.js +1 -143
  3. package/dist/src/api/models/index.d.ts +0 -2
  4. package/dist/src/api/models/index.js +0 -2
  5. package/dist/src/common/constants.d.ts +1 -1
  6. package/dist/src/ember-vaults.d.ts +76 -4
  7. package/dist/src/ember-vaults.js +127 -0
  8. package/dist/src/index.d.ts +1 -0
  9. package/dist/src/index.js +1 -0
  10. package/dist/src/solana-vaults/index.d.ts +3 -0
  11. package/dist/src/solana-vaults/index.js +3 -0
  12. package/dist/src/solana-vaults/interfaces/index.d.ts +260 -0
  13. package/dist/src/solana-vaults/interfaces/index.js +37 -0
  14. package/dist/src/solana-vaults/on-chain-calls/index.d.ts +1 -0
  15. package/dist/src/solana-vaults/on-chain-calls/index.js +1 -0
  16. package/dist/src/solana-vaults/on-chain-calls/vault-reader.d.ts +190 -0
  17. package/dist/src/solana-vaults/on-chain-calls/vault-reader.js +432 -0
  18. package/dist/src/solana-vaults/utils/borsh.d.ts +65 -0
  19. package/dist/src/solana-vaults/utils/borsh.js +237 -0
  20. package/dist/src/solana-vaults/utils/deployment-parser.d.ts +94 -0
  21. package/dist/src/solana-vaults/utils/deployment-parser.js +174 -0
  22. package/dist/src/solana-vaults/utils/index.d.ts +3 -0
  23. package/dist/src/solana-vaults/utils/index.js +3 -0
  24. package/dist/src/solana-vaults/utils/math.d.ts +77 -0
  25. package/dist/src/solana-vaults/utils/math.js +111 -0
  26. package/dist/src/solana-vaults/utils/pdas.d.ts +54 -0
  27. package/dist/src/solana-vaults/utils/pdas.js +93 -0
  28. package/dist/src/sui-vaults/on-chain-calls/vault.d.ts +0 -35
  29. package/dist/src/sui-vaults/on-chain-calls/vault.js +0 -25
  30. package/package.json +10 -4
  31. package/dist/src/api/models/strategy.d.ts +0 -60
  32. package/dist/src/api/models/strategy.js +0 -14
  33. package/dist/src/api/models/update-vault-strategies.d.ts +0 -61
  34. package/dist/src/api/models/update-vault-strategies.js +0 -14
  35. package/dist/src/sui-vaults/interfaces/bcs.d.ts +0 -26
  36. package/dist/src/sui-vaults/interfaces/bcs.js +0 -17
@@ -24,10 +24,8 @@ import type { ProofOfCapitalReport } from "../models/index.js";
24
24
  import type { ProtocolInfo } from "../models/index.js";
25
25
  import type { RawEvent } from "../models/index.js";
26
26
  import type { SharePriceHistory } from "../models/index.js";
27
- import type { Strategy } from "../models/index.js";
28
27
  import type { Tag } from "../models/index.js";
29
28
  import type { TvlHistory } from "../models/index.js";
30
- import type { UpdateVaultStrategies } from "../models/index.js";
31
29
  import type { VaultDetail } from "../models/index.js";
32
30
  import type { VaultsStats } from "../models/index.js";
33
31
  /**
@@ -144,14 +142,6 @@ export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration)
144
142
  * @throws {RequiredError}
145
143
  */
146
144
  getVaultSharePriceHistory: (vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
147
- /**
148
- *
149
- * @summary Get the strategy of the vault
150
- * @param {string} vaultId The id of the vault
151
- * @param {*} [options] Override http request option.
152
- * @throws {RequiredError}
153
- */
154
- getVaultStrategy: (vaultId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
155
145
  /**
156
146
  *
157
147
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -186,14 +176,6 @@ export declare const VaultsApiAxiosParamCreator: (configuration?: Configuration)
186
176
  * @throws {RequiredError}
187
177
  */
188
178
  getVaultsStats: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
189
- /**
190
- *
191
- * @summary Update the strategy of the vault
192
- * @param {UpdateVaultStrategies} updateVaultStrategies
193
- * @param {*} [options] Override http request option.
194
- * @throws {RequiredError}
195
- */
196
- updateVaultStrategy: (updateVaultStrategies: UpdateVaultStrategies, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
197
179
  };
198
180
  /**
199
181
  * VaultsApi - functional programming interface
@@ -309,14 +291,6 @@ export declare const VaultsApiFp: (configuration?: Configuration) => {
309
291
  * @throws {RequiredError}
310
292
  */
311
293
  getVaultSharePriceHistory(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SharePriceHistory>>>;
312
- /**
313
- *
314
- * @summary Get the strategy of the vault
315
- * @param {string} vaultId The id of the vault
316
- * @param {*} [options] Override http request option.
317
- * @throws {RequiredError}
318
- */
319
- getVaultStrategy(vaultId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Strategy>>>;
320
294
  /**
321
295
  *
322
296
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -351,14 +325,6 @@ export declare const VaultsApiFp: (configuration?: Configuration) => {
351
325
  * @throws {RequiredError}
352
326
  */
353
327
  getVaultsStats(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VaultsStats>>;
354
- /**
355
- *
356
- * @summary Update the strategy of the vault
357
- * @param {UpdateVaultStrategies} updateVaultStrategies
358
- * @param {*} [options] Override http request option.
359
- * @throws {RequiredError}
360
- */
361
- updateVaultStrategy(updateVaultStrategies: UpdateVaultStrategies, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Strategy>>>;
362
328
  };
363
329
  /**
364
330
  * VaultsApi - factory interface
@@ -474,14 +440,6 @@ export declare const VaultsApiFactory: (configuration?: Configuration, basePath?
474
440
  * @throws {RequiredError}
475
441
  */
476
442
  getVaultSharePriceHistory(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): AxiosPromise<Array<SharePriceHistory>>;
477
- /**
478
- *
479
- * @summary Get the strategy of the vault
480
- * @param {string} vaultId The id of the vault
481
- * @param {*} [options] Override http request option.
482
- * @throws {RequiredError}
483
- */
484
- getVaultStrategy(vaultId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Strategy>>;
485
443
  /**
486
444
  *
487
445
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -516,14 +474,6 @@ export declare const VaultsApiFactory: (configuration?: Configuration, basePath?
516
474
  * @throws {RequiredError}
517
475
  */
518
476
  getVaultsStats(options?: RawAxiosRequestConfig): AxiosPromise<VaultsStats>;
519
- /**
520
- *
521
- * @summary Update the strategy of the vault
522
- * @param {UpdateVaultStrategies} updateVaultStrategies
523
- * @param {*} [options] Override http request option.
524
- * @throws {RequiredError}
525
- */
526
- updateVaultStrategy(updateVaultStrategies: UpdateVaultStrategies, options?: RawAxiosRequestConfig): AxiosPromise<Array<Strategy>>;
527
477
  };
528
478
  /**
529
479
  * VaultsApi - object-oriented interface
@@ -653,15 +603,6 @@ export declare class VaultsApi extends BaseAPI {
653
603
  * @memberof VaultsApi
654
604
  */
655
605
  getVaultSharePriceHistory(vaultId: string, limit?: number, interval?: HistoryInterval, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SharePriceHistory[], any, {}>>;
656
- /**
657
- *
658
- * @summary Get the strategy of the vault
659
- * @param {string} vaultId The id of the vault
660
- * @param {*} [options] Override http request option.
661
- * @throws {RequiredError}
662
- * @memberof VaultsApi
663
- */
664
- getVaultStrategy(vaultId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Strategy[], any, {}>>;
665
606
  /**
666
607
  *
667
608
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -700,13 +641,4 @@ export declare class VaultsApi extends BaseAPI {
700
641
  * @memberof VaultsApi
701
642
  */
702
643
  getVaultsStats(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VaultsStats, any, {}>>;
703
- /**
704
- *
705
- * @summary Update the strategy of the vault
706
- * @param {UpdateVaultStrategies} updateVaultStrategies
707
- * @param {*} [options] Override http request option.
708
- * @throws {RequiredError}
709
- * @memberof VaultsApi
710
- */
711
- updateVaultStrategy(updateVaultStrategies: UpdateVaultStrategies, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Strategy[], any, {}>>;
712
644
  }
@@ -14,7 +14,7 @@
14
14
  import globalAxios from "axios";
15
15
  // Some imports not used depending on template conditions
16
16
  // @ts-ignore
17
- import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from "../common.js";
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from "../common.js";
18
18
  // @ts-ignore
19
19
  import { BASE_PATH, BaseAPI, operationServerMap } from "../base.js";
20
20
  /**
@@ -471,38 +471,6 @@ export const VaultsApiAxiosParamCreator = function (configuration) {
471
471
  options: localVarRequestOptions
472
472
  };
473
473
  },
474
- /**
475
- *
476
- * @summary Get the strategy of the vault
477
- * @param {string} vaultId The id of the vault
478
- * @param {*} [options] Override http request option.
479
- * @throws {RequiredError}
480
- */
481
- getVaultStrategy: async (vaultId, options = {}) => {
482
- // verify required parameter 'vaultId' is not null or undefined
483
- assertParamExists("getVaultStrategy", "vaultId", vaultId);
484
- const localVarPath = `/api/v1/vaults/strategy/{vaultId}`.replace(`{${"vaultId"}}`, encodeURIComponent(String(vaultId)));
485
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
486
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
487
- let baseOptions;
488
- if (configuration) {
489
- baseOptions = configuration.baseOptions;
490
- }
491
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
492
- const localVarHeaderParameter = {};
493
- const localVarQueryParameter = {};
494
- setSearchParams(localVarUrlObj, localVarQueryParameter);
495
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
496
- localVarRequestOptions.headers = {
497
- ...localVarHeaderParameter,
498
- ...headersFromBaseOptions,
499
- ...options.headers
500
- };
501
- return {
502
- url: toPathString(localVarUrlObj),
503
- options: localVarRequestOptions
504
- };
505
- },
506
474
  /**
507
475
  *
508
476
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -641,40 +609,6 @@ export const VaultsApiAxiosParamCreator = function (configuration) {
641
609
  url: toPathString(localVarUrlObj),
642
610
  options: localVarRequestOptions
643
611
  };
644
- },
645
- /**
646
- *
647
- * @summary Update the strategy of the vault
648
- * @param {UpdateVaultStrategies} updateVaultStrategies
649
- * @param {*} [options] Override http request option.
650
- * @throws {RequiredError}
651
- */
652
- updateVaultStrategy: async (updateVaultStrategies, options = {}) => {
653
- // verify required parameter 'updateVaultStrategies' is not null or undefined
654
- assertParamExists("updateVaultStrategy", "updateVaultStrategies", updateVaultStrategies);
655
- const localVarPath = `/api/v1/vaults/strategy`;
656
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
657
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
658
- let baseOptions;
659
- if (configuration) {
660
- baseOptions = configuration.baseOptions;
661
- }
662
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
663
- const localVarHeaderParameter = {};
664
- const localVarQueryParameter = {};
665
- localVarHeaderParameter["Content-Type"] = "application/json";
666
- setSearchParams(localVarUrlObj, localVarQueryParameter);
667
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
668
- localVarRequestOptions.headers = {
669
- ...localVarHeaderParameter,
670
- ...headersFromBaseOptions,
671
- ...options.headers
672
- };
673
- localVarRequestOptions.data = serializeDataIfNeeded(updateVaultStrategies, localVarRequestOptions, configuration);
674
- return {
675
- url: toPathString(localVarUrlObj),
676
- options: localVarRequestOptions
677
- };
678
612
  }
679
613
  };
680
614
  };
@@ -856,19 +790,6 @@ export const VaultsApiFp = function (configuration) {
856
790
  const localVarOperationServerBasePath = operationServerMap["VaultsApi.getVaultSharePriceHistory"]?.[localVarOperationServerIndex]?.url;
857
791
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
858
792
  },
859
- /**
860
- *
861
- * @summary Get the strategy of the vault
862
- * @param {string} vaultId The id of the vault
863
- * @param {*} [options] Override http request option.
864
- * @throws {RequiredError}
865
- */
866
- async getVaultStrategy(vaultId, options) {
867
- const localVarAxiosArgs = await localVarAxiosParamCreator.getVaultStrategy(vaultId, options);
868
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
869
- const localVarOperationServerBasePath = operationServerMap["VaultsApi.getVaultStrategy"]?.[localVarOperationServerIndex]?.url;
870
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
871
- },
872
793
  /**
873
794
  *
874
795
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -923,19 +844,6 @@ export const VaultsApiFp = function (configuration) {
923
844
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
924
845
  const localVarOperationServerBasePath = operationServerMap["VaultsApi.getVaultsStats"]?.[localVarOperationServerIndex]?.url;
925
846
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
926
- },
927
- /**
928
- *
929
- * @summary Update the strategy of the vault
930
- * @param {UpdateVaultStrategies} updateVaultStrategies
931
- * @param {*} [options] Override http request option.
932
- * @throws {RequiredError}
933
- */
934
- async updateVaultStrategy(updateVaultStrategies, options) {
935
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateVaultStrategy(updateVaultStrategies, options);
936
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
937
- const localVarOperationServerBasePath = operationServerMap["VaultsApi.updateVaultStrategy"]?.[localVarOperationServerIndex]?.url;
938
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
939
847
  }
940
848
  };
941
849
  };
@@ -1103,18 +1011,6 @@ export const VaultsApiFactory = function (configuration, basePath, axios) {
1103
1011
  .getVaultSharePriceHistory(vaultId, limit, interval, options)
1104
1012
  .then(request => request(axios, basePath));
1105
1013
  },
1106
- /**
1107
- *
1108
- * @summary Get the strategy of the vault
1109
- * @param {string} vaultId The id of the vault
1110
- * @param {*} [options] Override http request option.
1111
- * @throws {RequiredError}
1112
- */
1113
- getVaultStrategy(vaultId, options) {
1114
- return localVarFp
1115
- .getVaultStrategy(vaultId, options)
1116
- .then(request => request(axios, basePath));
1117
- },
1118
1014
  /**
1119
1015
  *
1120
1016
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -1164,18 +1060,6 @@ export const VaultsApiFactory = function (configuration, basePath, axios) {
1164
1060
  return localVarFp
1165
1061
  .getVaultsStats(options)
1166
1062
  .then(request => request(axios, basePath));
1167
- },
1168
- /**
1169
- *
1170
- * @summary Update the strategy of the vault
1171
- * @param {UpdateVaultStrategies} updateVaultStrategies
1172
- * @param {*} [options] Override http request option.
1173
- * @throws {RequiredError}
1174
- */
1175
- updateVaultStrategy(updateVaultStrategies, options) {
1176
- return localVarFp
1177
- .updateVaultStrategy(updateVaultStrategies, options)
1178
- .then(request => request(axios, basePath));
1179
1063
  }
1180
1064
  };
1181
1065
  };
@@ -1355,19 +1239,6 @@ export class VaultsApi extends BaseAPI {
1355
1239
  .getVaultSharePriceHistory(vaultId, limit, interval, options)
1356
1240
  .then(request => request(this.axios, this.basePath));
1357
1241
  }
1358
- /**
1359
- *
1360
- * @summary Get the strategy of the vault
1361
- * @param {string} vaultId The id of the vault
1362
- * @param {*} [options] Override http request option.
1363
- * @throws {RequiredError}
1364
- * @memberof VaultsApi
1365
- */
1366
- getVaultStrategy(vaultId, options) {
1367
- return VaultsApiFp(this.configuration)
1368
- .getVaultStrategy(vaultId, options)
1369
- .then(request => request(this.axios, this.basePath));
1370
- }
1371
1242
  /**
1372
1243
  *
1373
1244
  * @summary Get the tvl history of the vault (1h, 1d, 1w, 1mon) descending by time
@@ -1422,17 +1293,4 @@ export class VaultsApi extends BaseAPI {
1422
1293
  .getVaultsStats(options)
1423
1294
  .then(request => request(this.axios, this.basePath));
1424
1295
  }
1425
- /**
1426
- *
1427
- * @summary Update the strategy of the vault
1428
- * @param {UpdateVaultStrategies} updateVaultStrategies
1429
- * @param {*} [options] Override http request option.
1430
- * @throws {RequiredError}
1431
- * @memberof VaultsApi
1432
- */
1433
- updateVaultStrategy(updateVaultStrategies, options) {
1434
- return VaultsApiFp(this.configuration)
1435
- .updateVaultStrategy(updateVaultStrategies, options)
1436
- .then(request => request(this.axios, this.basePath));
1437
- }
1438
1296
  }
@@ -50,14 +50,12 @@ export * from "./request-redeemed-event.js";
50
50
  export * from "./reward.js";
51
51
  export * from "./reward-token.js";
52
52
  export * from "./share-price-history.js";
53
- export * from "./strategy.js";
54
53
  export * from "./strategy-account.js";
55
54
  export * from "./sub-account.js";
56
55
  export * from "./supplied.js";
57
56
  export * from "./tag.js";
58
57
  export * from "./tvl-history.js";
59
58
  export * from "./ultra-coin-info.js";
60
- export * from "./update-vault-strategies.js";
61
59
  export * from "./vault-admin-changed-event.js";
62
60
  export * from "./vault-created-event.js";
63
61
  export * from "./vault-deposit-event.js";
@@ -50,14 +50,12 @@ export * from "./request-redeemed-event.js";
50
50
  export * from "./reward.js";
51
51
  export * from "./reward-token.js";
52
52
  export * from "./share-price-history.js";
53
- export * from "./strategy.js";
54
53
  export * from "./strategy-account.js";
55
54
  export * from "./sub-account.js";
56
55
  export * from "./supplied.js";
57
56
  export * from "./tag.js";
58
57
  export * from "./tvl-history.js";
59
58
  export * from "./ultra-coin-info.js";
60
- export * from "./update-vault-strategies.js";
61
59
  export * from "./vault-admin-changed-event.js";
62
60
  export * from "./vault-created-event.js";
63
61
  export * from "./vault-deposit-event.js";
@@ -1,5 +1,5 @@
1
1
  export type PlatformEnv = "prod" | "staging" | "dev";
2
- export type ChainType = "sui" | "evm";
2
+ export type ChainType = "sui" | "evm" | "solana";
3
3
  export type EnvironmentConfig = {
4
4
  [K in PlatformEnv]: {
5
5
  apiHost: string;
@@ -18,6 +18,10 @@ import { EVMDeploymentParser } from "./evm-vaults/utils/deployment-parser.js";
18
18
  import { EVMVaultReader } from "./evm-vaults/on-chain-calls/vault-reader.js";
19
19
  import { AccountsApi, VaultsApi } from "./api/index.js";
20
20
  import { AccountsApi as AccountsV2Api, VaultsApi as VaultsV2Api } from "./api/v2/index.js";
21
+ import type { Connection as SolanaConnection } from "@solana/web3.js";
22
+ import type { ISolanaDeployment } from "./solana-vaults/interfaces/index.js";
23
+ import { SolanaDeploymentParser } from "./solana-vaults/utils/deployment-parser.js";
24
+ import { SolanaVaultReader } from "./solana-vaults/on-chain-calls/vault-reader.js";
21
25
  import { ChainType, PlatformEnv } from "./common/constants.js";
22
26
  /**
23
27
  * SUI-specific initialization options
@@ -46,7 +50,44 @@ export interface EvmInitOptions {
46
50
  environment?: PlatformEnv;
47
51
  chainIdentifier: string;
48
52
  }
49
- export type EmberVaultsInitOptions = SuiInitOptions | EvmInitOptions;
53
+ /**
54
+ * Solana-specific initialization options.
55
+ *
56
+ * `connection` rather than a provider: web3.js has no provider abstraction,
57
+ * and every read below goes through it. No signer yet - this slice is
58
+ * read-only, and the signer shape (wallet adapter vs Keypair) is settled when
59
+ * the write builders land.
60
+ */
61
+ export interface SolanaInitOptions {
62
+ chainType: "solana";
63
+ connection: SolanaConnection;
64
+ /**
65
+ * Unused on Solana and accepted only so the constructor can read it
66
+ * uniformly. The chain identifier is "solana" on every cluster; which
67
+ * cluster an environment talks to follows from the deployment it serves.
68
+ */
69
+ chainIdentifier?: string;
70
+ walletAddress?: string;
71
+ deployment?: ISolanaDeployment;
72
+ basePath?: string;
73
+ environment?: PlatformEnv;
74
+ }
75
+ export type EmberVaultsInitOptions = SuiInitOptions | EvmInitOptions | SolanaInitOptions;
76
+ /**
77
+ * Solana-specific EmberVaults instance type.
78
+ *
79
+ * Narrower than its Sui and EVM counterparts on purpose: reads only. The
80
+ * admin, operator, vaultAdmin, user and txBuilder surfaces follow, and the
81
+ * getters for them throw rather than returning undefined until they do.
82
+ */
83
+ export interface SolanaEmberVaults {
84
+ chainType: "solana";
85
+ connection: SolanaConnection;
86
+ parser: SolanaDeploymentParser;
87
+ walletAddress?: string;
88
+ reader: SolanaVaultReader;
89
+ deployment: ISolanaDeployment;
90
+ }
50
91
  /**
51
92
  * SUI-specific EmberVaults instance type
52
93
  */
@@ -133,9 +174,21 @@ export declare class EmberVaults {
133
174
  private _evmUser?;
134
175
  private _evmDeployment?;
135
176
  private _evmVaultReader?;
177
+ private _solanaConnection?;
178
+ private _solanaParser?;
179
+ private _solanaDeployment?;
180
+ private _solanaVaultReader?;
136
181
  private _walletAddress?;
137
182
  private _chainIdentifier?;
138
183
  constructor(options: EmberVaultsInitOptions);
184
+ /**
185
+ * Solana setup.
186
+ *
187
+ * The deployment is optional here as it is on the other chains: pass one
188
+ * to work offline, or call `init()` to fetch it from the API. Without
189
+ * either, the reader has nothing to resolve addresses against.
190
+ */
191
+ private _initSolana;
139
192
  private _initSui;
140
193
  private _initEvm;
141
194
  /**
@@ -146,19 +199,30 @@ export declare class EmberVaults {
146
199
  * Updates the deployment configuration
147
200
  * @param newDeployment The new deployment configuration (ISuiDeployment or EvmProtocolInfo)
148
201
  */
149
- updateDeployment(newDeployment: ISuiDeployment | EvmProtocolInfo): void;
202
+ updateDeployment(newDeployment: ISuiDeployment | EvmProtocolInfo | ISolanaDeployment): void;
150
203
  get suiClient(): SuiClient;
151
204
  get network(): string;
152
205
  get provider(): EvmProvider | undefined;
153
206
  get walletAddress(): string | undefined;
207
+ /**
208
+ * Read-only vault access. Sui has no reader, so this is EVM or Solana.
209
+ */
210
+ get reader(): EVMVaultReader | SolanaVaultReader;
211
+ /**
212
+ * Solana's write surfaces are not built yet. Thrown rather than returning
213
+ * undefined so the failure names what is missing instead of surfacing as
214
+ * "cannot read property of undefined" several frames later.
215
+ */
216
+ private notOnSolana;
217
+ get connection(): SolanaConnection;
154
218
  get signer(): SuiSigner | EvmSigner | undefined;
155
- get parser(): SuiDeploymentParser | EVMDeploymentParser;
219
+ get parser(): SuiDeploymentParser | EVMDeploymentParser | SolanaDeploymentParser;
156
220
  get txBuilder(): SuiTxBuilder | EVMTxBuilder;
157
221
  get admin(): SuiAdminCalls | EVMAdminCalls;
158
222
  get operator(): SuiOperatorCalls | EVMOperatorCalls;
159
223
  get vaultAdmin(): SuiVaultAdminCalls | EVMVaultAdminCalls;
160
224
  get user(): SuiUserCalls | EVMUserCalls;
161
- get deployment(): ISuiDeployment | EvmProtocolInfo;
225
+ get deployment(): ISuiDeployment | EvmProtocolInfo | ISolanaDeployment;
162
226
  /**
163
227
  * Check if this is a SUI instance
164
228
  */
@@ -166,6 +230,10 @@ export declare class EmberVaults {
166
230
  /**
167
231
  * Check if this is an EVM instance
168
232
  */
233
+ /**
234
+ * Check if this is a Solana instance
235
+ */
236
+ isSolana(): this is EmberVaults & SolanaEmberVaults;
169
237
  isEvm(): this is EmberVaults & EvmEmberVaults;
170
238
  /**
171
239
  * Get SUI-specific instance (throws if not SUI)
@@ -175,4 +243,8 @@ export declare class EmberVaults {
175
243
  * Get EVM-specific instance (throws if not EVM)
176
244
  */
177
245
  asEvm(): EvmEmberVaults;
246
+ /**
247
+ * Get Solana-specific instance (throws if not Solana)
248
+ */
249
+ asSolana(): SolanaEmberVaults;
178
250
  }