@evergonlabs/tmi-protocol-api-client 0.16.6 → 0.17.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.cts CHANGED
@@ -10,7 +10,7 @@ type Platform = {
10
10
  /**
11
11
  * Transaction hash
12
12
  */
13
- txHash: string;
13
+ transactionHash: string;
14
14
  /**
15
15
  * Date ISO format
16
16
  */
@@ -306,7 +306,7 @@ type RewardDistributionComplex = {
306
306
  /**
307
307
  * The Wallet address that is configured as Distributor of Rewards
308
308
  *
309
- * Distributor must approve assets-spending for Diamond contract before Campaign is started
309
+ * Distributor will have to approve reward packets for Diamond contract when distributing them to the pool
310
310
  */
311
311
  distributor: string;
312
312
  };
@@ -354,7 +354,7 @@ type FractionsMarket = {
354
354
  /**
355
355
  * Transaction hash
356
356
  */
357
- txHash: string;
357
+ transactionHash: string;
358
358
  /**
359
359
  * Template of deployed Fractions Market contract
360
360
  */
@@ -575,7 +575,7 @@ type FractionsSale = {
575
575
  /**
576
576
  * Transaction hash
577
577
  */
578
- txHash: string;
578
+ transactionHash: string;
579
579
  /**
580
580
  * Date ISO format
581
581
  */
@@ -620,12 +620,35 @@ type FractionsActivity = {
620
620
  */
621
621
  platform: string;
622
622
  campaignId: string;
623
- from: string;
624
- type: string;
625
- metadata?: unknown;
626
- txHash: string;
623
+ transactionHash: unknown;
624
+ from: unknown;
627
625
  createdAt: string;
628
626
  updatedAt: string;
627
+ metadata: {
628
+ type: 'created';
629
+ } | {
630
+ type: 'status_update';
631
+ status: 'created' | 'approved' | 'rejected' | 'finalized' | 'refunded';
632
+ } | {
633
+ type: 'purchase';
634
+ purchaser: string;
635
+ priceId: string;
636
+ amountOfFractions: string;
637
+ } | {
638
+ type: 'claim';
639
+ receiver: string;
640
+ semiFungibleBurntId: string;
641
+ amountOfFractionsBurnt: string;
642
+ } | {
643
+ type: 'refund';
644
+ amount: string;
645
+ } | {
646
+ type: 'withdraw';
647
+ amount: string;
648
+ } | {
649
+ type: 'withdraw_non_wrapped';
650
+ amount: string;
651
+ };
629
652
  };
630
653
  type FractionsSaleStatistics = {
631
654
  /**
@@ -2131,7 +2154,7 @@ type PostStakingTemplatesRwaV0NotifyRewardsData = {
2131
2154
  */
2132
2155
  poolId: string | number | bigint;
2133
2156
  /**
2134
- * The number of Input Packets to add to Pool.
2157
+ * Number of Reward Packets to distribute to pool stakers.
2135
2158
  */
2136
2159
  amount: string | number | bigint;
2137
2160
  };
@@ -2886,6 +2909,7 @@ type PostV0FractionsSalesActivityData = {
2886
2909
  * Id of a Sale
2887
2910
  */
2888
2911
  campaignId?: string | number | bigint;
2912
+ operationType?: 'created' | 'status_update' | 'purchase' | 'claim' | 'withdraw' | 'withdraw_non_wrapped' | 'refund';
2889
2913
  };
2890
2914
  };
2891
2915
  path?: never;
@@ -3401,7 +3425,7 @@ type PostIssuanceErc20RenounceRoleResponses = {
3401
3425
  };
3402
3426
  type PostIssuanceErc20RenounceRoleResponse = PostIssuanceErc20RenounceRoleResponses[keyof PostIssuanceErc20RenounceRoleResponses];
3403
3427
  type ClientOptions = {
3404
- baseUrl: 'https://protocol-api.tmi.evergonlabs.com/' | (string & {});
3428
+ baseUrl: 'http://localhost:3000' | (string & {});
3405
3429
  };
3406
3430
 
3407
3431
  type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ type Platform = {
10
10
  /**
11
11
  * Transaction hash
12
12
  */
13
- txHash: string;
13
+ transactionHash: string;
14
14
  /**
15
15
  * Date ISO format
16
16
  */
@@ -306,7 +306,7 @@ type RewardDistributionComplex = {
306
306
  /**
307
307
  * The Wallet address that is configured as Distributor of Rewards
308
308
  *
309
- * Distributor must approve assets-spending for Diamond contract before Campaign is started
309
+ * Distributor will have to approve reward packets for Diamond contract when distributing them to the pool
310
310
  */
311
311
  distributor: string;
312
312
  };
@@ -354,7 +354,7 @@ type FractionsMarket = {
354
354
  /**
355
355
  * Transaction hash
356
356
  */
357
- txHash: string;
357
+ transactionHash: string;
358
358
  /**
359
359
  * Template of deployed Fractions Market contract
360
360
  */
@@ -575,7 +575,7 @@ type FractionsSale = {
575
575
  /**
576
576
  * Transaction hash
577
577
  */
578
- txHash: string;
578
+ transactionHash: string;
579
579
  /**
580
580
  * Date ISO format
581
581
  */
@@ -620,12 +620,35 @@ type FractionsActivity = {
620
620
  */
621
621
  platform: string;
622
622
  campaignId: string;
623
- from: string;
624
- type: string;
625
- metadata?: unknown;
626
- txHash: string;
623
+ transactionHash: unknown;
624
+ from: unknown;
627
625
  createdAt: string;
628
626
  updatedAt: string;
627
+ metadata: {
628
+ type: 'created';
629
+ } | {
630
+ type: 'status_update';
631
+ status: 'created' | 'approved' | 'rejected' | 'finalized' | 'refunded';
632
+ } | {
633
+ type: 'purchase';
634
+ purchaser: string;
635
+ priceId: string;
636
+ amountOfFractions: string;
637
+ } | {
638
+ type: 'claim';
639
+ receiver: string;
640
+ semiFungibleBurntId: string;
641
+ amountOfFractionsBurnt: string;
642
+ } | {
643
+ type: 'refund';
644
+ amount: string;
645
+ } | {
646
+ type: 'withdraw';
647
+ amount: string;
648
+ } | {
649
+ type: 'withdraw_non_wrapped';
650
+ amount: string;
651
+ };
629
652
  };
630
653
  type FractionsSaleStatistics = {
631
654
  /**
@@ -2131,7 +2154,7 @@ type PostStakingTemplatesRwaV0NotifyRewardsData = {
2131
2154
  */
2132
2155
  poolId: string | number | bigint;
2133
2156
  /**
2134
- * The number of Input Packets to add to Pool.
2157
+ * Number of Reward Packets to distribute to pool stakers.
2135
2158
  */
2136
2159
  amount: string | number | bigint;
2137
2160
  };
@@ -2886,6 +2909,7 @@ type PostV0FractionsSalesActivityData = {
2886
2909
  * Id of a Sale
2887
2910
  */
2888
2911
  campaignId?: string | number | bigint;
2912
+ operationType?: 'created' | 'status_update' | 'purchase' | 'claim' | 'withdraw' | 'withdraw_non_wrapped' | 'refund';
2889
2913
  };
2890
2914
  };
2891
2915
  path?: never;
@@ -3401,7 +3425,7 @@ type PostIssuanceErc20RenounceRoleResponses = {
3401
3425
  };
3402
3426
  type PostIssuanceErc20RenounceRoleResponse = PostIssuanceErc20RenounceRoleResponses[keyof PostIssuanceErc20RenounceRoleResponses];
3403
3427
  type ClientOptions = {
3404
- baseUrl: 'https://protocol-api.tmi.evergonlabs.com/' | (string & {});
3428
+ baseUrl: 'http://localhost:3000' | (string & {});
3405
3429
  };
3406
3430
 
3407
3431
  type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{createClient as wt}from"@hey-api/client-fetch";var l=e=>(e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),c=async e=>(e=l(e),e),S=async e=>(e=e.map(r=>l(r)),e),k=e=>(e.poolId=BigInt(e.poolId.toString()),e.createdAt=new Date(e.createdAt),e),R=async e=>(e=e.map(r=>k(r)),e),T=async e=>(e=k(e),e),P=e=>(e.poolId&&(e.poolId=BigInt(e.poolId.toString())),e.stakeId=BigInt(e.stakeId.toString()),e.activePackets=BigInt(e.activePackets.toString()),e.rewardsClaimed=BigInt(e.rewardsClaimed.toString()),e.unlockTimestamp=new Date(e.unlockTimestamp),e.startTimestamp=new Date(e.startTimestamp),e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),V=async e=>(e=e.map(r=>P(r)),e),Vt=e=>(e.poolId&&(e.poolId=BigInt(e.poolId.toString())),e.stakeId=BigInt(e.stakeId.toString()),e.createdAt=new Date(e.createdAt),e),E=async e=>(e=e.map(r=>Vt(r)),e),g=async e=>(e=P(e),e),m=e=>(e.poolId&&(e.poolId=BigInt(e.poolId.toString())),e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),u=async e=>(e=e.map(r=>m(r)),e),h=async e=>(e=e.map(r=>m(r)),e),w=async e=>(e.poolId=BigInt(e.poolId.toString()),e.stakeId=BigInt(e.stakeId.toString()),e),d=async e=>(e.poolId=BigInt(e.poolId.toString()),e),G=async e=>(e.poolId=BigInt(e.poolId.toString()),e.stakeId=BigInt(e.stakeId.toString()),e),f=async e=>(e.poolId=BigInt(e.poolId.toString()),e),F=async e=>(e.poolId=BigInt(e.poolId.toString()),e.stakeId=BigInt(e.stakeId.toString()),e),v=async e=>(e.poolId=BigInt(e.poolId.toString()),e),O=e=>(e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),D=async e=>(e=O(e),e),C=async e=>(e=e.map(r=>O(r)),e),y=async e=>(e.nftId=BigInt(e.nftId.toString()),e.campaignId=BigInt(e.campaignId.toString()),e.fractionsCreated=BigInt(e.fractionsCreated.toString()),e),Et=e=>{return e.timeline.startDate=new Date(e.timeline.startDate),e.timeline.endDate=new Date(e.timeline.endDate),e.timeline;return e.vesting.cliffDate=new Date(e.vesting.cliffDate),e.vesting;return e.wrappedAssets=e.wrappedAssets.map(r=>(r.wrappedAmount=BigInt(r.wrappedAmount.toString()),r)),e.fundingAssets=e.fundingAssets.map(r=>(r.amountPerPacket=BigInt(r.amountPerPacket.toString()),r)),e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e};var x=async e=>(e.campaignId=BigInt(e.campaignId.toString()),e.burnId=BigInt(e.burnId.toString()),e.nextBurnId=BigInt(e.nextBurnId.toString()),e.amountOfFractionsBurnt=BigInt(e.amountOfFractionsBurnt.toString()),e),A=async e=>(e=e.map(r=>Et(r)),e),I=async e=>(e.campaignId=BigInt(e.campaignId.toString()),e.packetsReceived=BigInt(e.packetsReceived.toString()),e),b=async e=>(e.nonce=BigInt(e.nonce.toString()),e.blockExpiration=BigInt(e.blockExpiration.toString()),e),gt=e=>(e.value=BigInt(e.value.toString()),e),L=async e=>(e=gt(e),e),W=async e=>(e.balance=BigInt(e.balance.toString()),e),B=e=>(e.tokenId&&(e.tokenId=BigInt(e.tokenId.toString())),e),j=async e=>(e=e.map(r=>B(r)),e),mt=e=>(e.balances=e.balances.map(r=>B(r)),e),N=async e=>(e=mt(e),e);import{createClient as ut,createConfig as ht}from"@hey-api/client-fetch";var t=ut(ht({baseUrl:"https://protocol-api.tmi.evergonlabs.com/"}));var U=e=>(e.client??t).get({responseTransformer:c,url:"/staking/platforms/get/v0",...e}),M=e=>(e?.client??t).post({responseTransformer:S,url:"/staking/platforms/search/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),J=e=>(e?.client??t).post({responseTransformer:R,url:"/staking/pools/searchPools/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),K=e=>(e.client??t).get({responseTransformer:T,url:"/staking/pools/getPool/v0",...e}),q=e=>(e?.client??t).post({responseTransformer:V,url:"/staking/stakes/searchStakes/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),z=e=>(e?.client??t).post({responseTransformer:E,url:"/staking/stakes/searchStakeEvents/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),_=e=>(e.client??t).get({responseTransformer:g,url:"/staking/stakes/getStake/v0",...e}),H=e=>(e?.client??t).get({url:"/staking/roles/getRoles/v0",...e}),Q=e=>(e?.client??t).post({url:"/staking/roles/grantRole/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),X=e=>(e?.client??t).post({responseTransformer:u,url:"/staking/roles/searchRoles/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Y=e=>(e?.client??t).post({responseTransformer:h,url:"/staking/roles/searchRoleEvents/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Z=e=>(e.client??t).get({url:"/stakingTemplates/reputation/v0/getPlatformDeployEvent",...e}),$=e=>(e.client??t).get({responseTransformer:w,url:"/stakingTemplates/reputation/v0/getStakeEvent",...e}),ee=e=>(e.client??t).get({responseTransformer:d,url:"/stakingTemplates/reputation/v0/getCreatePoolEvent",...e}),te=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/getReward",...e,headers:{"Content-Type":"application/json",...e?.headers}}),re=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/partialUnstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),oe=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/restake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),se=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/stake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ae=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/unstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ne=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/createPool",...e,headers:{"Content-Type":"application/json",...e?.headers}}),pe=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/createPlatform",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ie=e=>(e.client??t).get({url:"/stakingTemplates/reputationLock/v0/getPlatformDeployEvent",...e}),le=e=>(e.client??t).get({responseTransformer:G,url:"/stakingTemplates/reputationLock/v0/getStakeEvent",...e}),ce=e=>(e.client??t).get({responseTransformer:f,url:"/stakingTemplates/reputationLock/v0/getCreatePoolEvent",...e}),Se=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/getReward",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ke=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/partialUnstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Re=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/restake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Te=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/stake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Pe=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/unstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ve=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/createPool",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ee=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/createPlatform",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e.client??t).get({url:"/stakingTemplates/rwa/v0/getPlatformDeployEvent",...e}),me=e=>(e.client??t).get({responseTransformer:F,url:"/stakingTemplates/rwa/v0/getStakeEvent",...e}),ue=e=>(e.client??t).get({responseTransformer:v,url:"/stakingTemplates/rwa/v0/getCreatePoolEvent",...e}),he=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/getReward",...e,headers:{"Content-Type":"application/json",...e?.headers}}),we=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/partialUnstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),de=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/restake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ge=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/stake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),fe=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/unstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Fe=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/createPool",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ve=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/createPlatform",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Oe=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/notifyRewards",...e,headers:{"Content-Type":"application/json",...e?.headers}}),De=e=>(e.client??t).get({responseTransformer:D,url:"/v0/fractions/markets/get",...e}),Ce=e=>(e?.client??t).post({responseTransformer:C,url:"/v0/fractions/markets/search",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ye=e=>(e.client??t).get({url:"/v0/fractions/markets/deployEvent",...e}),xe=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deploy",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ae=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deployNid",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ie=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deployContinuousWithdraw",...e,headers:{"Content-Type":"application/json",...e?.headers}}),be=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deployContinuousWithdrawNid",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Le=e=>(e.client??t).get({url:"/v0/fractions/platforms/initCompilot",...e}),We=e=>(e?.client??t).post({url:"/v0/fractions/fractions/approveWrapper",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Be=e=>(e?.client??t).post({url:"/v0/fractions/fractions/approveWrapperAsErc20Spender",...e,headers:{"Content-Type":"application/json",...e?.headers}}),je=e=>(e?.client??t).post({url:"/v0/fractions/fractions/approveWrapperAsErc721Spender",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ne=e=>(e?.client??t).get({url:"/v0/fractions/roles",...e}),Ue=e=>(e?.client??t).post({url:"/v0/fractions/roles/grant",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Me=e=>(e?.client??t).post({url:"/v0/fractions/sales/fractions",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Je=e=>(e.client??t).get({responseTransformer:y,url:"/v0/fractions/sales/getFractionsCreatedEvent",...e}),Ke=e=>(e?.client??t).post({url:"/v0/fractions/sales/approve",...e,headers:{"Content-Type":"application/json",...e?.headers}}),qe=e=>(e?.client??t).post({url:"/v0/fractions/sales/reject",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ze=e=>(e?.client??t).post({url:"/v0/fractions/sales/recover",...e,headers:{"Content-Type":"application/json",...e?.headers}}),_e=e=>(e?.client??t).post({url:"/v0/fractions/sales/complete",...e,headers:{"Content-Type":"application/json",...e?.headers}}),He=e=>(e?.client??t).post({url:"/v0/fractions/sales/unlockWrappedAssets",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Qe=e=>(e?.client??t).post({url:"/v0/fractions/sales/purchase",...e,headers:{"Content-Type":"application/json",...e?.headers}});var Xe=e=>(e?.client??t).post({url:"/v0/fractions/sales/withdrawPaymentToken",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ye=e=>(e?.client??t).post({url:"/v0/fractions/sales/receiveFundsAfterNonFunded",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ze=e=>(e?.client??t).post({url:"/v0/fractions/sales/checkAndJumpToNonFunded",...e,headers:{"Content-Type":"application/json",...e?.headers}}),$e=e=>(e?.client??t).post({url:"/v0/fractions/sales/receiveNonPurchasedWrappedAssets",...e,headers:{"Content-Type":"application/json",...e?.headers}}),et=e=>(e?.client??t).post({url:"/v0/fractions/sales/vesting/editCliff",...e,headers:{"Content-Type":"application/json",...e?.headers}}),tt=e=>(e?.client??t).post({url:"/v0/fractions/sales/vesting/claim",...e,headers:{"Content-Type":"application/json",...e?.headers}}),rt=e=>(e.client??t).get({responseTransformer:x,url:"/v0/fractions/sales/vesting/getClaimVestedTokensEvent",...e}),ot=e=>(e?.client??t).post({responseTransformer:A,url:"/v0/fractions/sales/search",...e,headers:{"Content-Type":"application/json",...e?.headers}}),st=e=>(e?.client??t).post({url:"/v0/fractions/sales/activity",...e,headers:{"Content-Type":"application/json",...e?.headers}}),at=e=>(e?.client??t).post({url:"/v0/fractions/sales/statistics",...e,headers:{"Content-Type":"application/json",...e?.headers}}),nt=e=>(e?.client??t).post({url:"/v0/fractions/sales/setFeeCapLimit",...e,headers:{"Content-Type":"application/json",...e?.headers}}),pt=e=>(e.client??t).get({responseTransformer:I,url:"/v0/fractions/sales/getWithdrawEvent",...e});var o=e=>(e?.client??t).post({url:"/v0/fractions/sig/nonce",...e,headers:{"Content-Type":"application/json",...e?.headers}}),s=e=>(e?.client??t).post({responseTransformer:b,url:"/v0/fractions/sig/authData",...e,headers:{"Content-Type":"application/json",...e?.headers}}),it=e=>(e?.client??t).post({responseTransformer:L,url:"/general/estimateGas",...e,headers:{"Content-Type":"application/json",...e?.headers}}),lt=e=>(e.client??t).get({responseTransformer:W,url:"/general/balance",...e}),ct=e=>(e?.client??t).post({responseTransformer:j,url:"/general/balances",...e,headers:{"Content-Type":"application/json",...e?.headers}}),St=e=>(e?.client??t).post({responseTransformer:N,url:"/general/searchBalances",...e,headers:{"Content-Type":"application/json",...e?.headers}}),a=e=>(e?.client??t).get({url:"/issuance/erc20",...e}),n=e=>(e?.client??t).post({url:"/issuance/erc20/mint",...e,headers:{"Content-Type":"application/json",...e?.headers}}),p=e=>(e?.client??t).post({url:"/issuance/erc20/burn",...e,headers:{"Content-Type":"application/json",...e?.headers}}),kt=e=>(e?.client??t).post({url:"/issuance/erc20/approve",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Rt=e=>(e?.client??t).post({url:"/issuance/erc20/transfer",...e,headers:{"Content-Type":"application/json",...e?.headers}}),i=e=>(e?.client??t).post({url:"/issuance/erc20/proxy",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Tt=e=>(e?.client??t).post({url:"/issuance/erc20/grantRole",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Pt=e=>(e?.client??t).post({url:"/issuance/erc20/renounceRole",...e,headers:{"Content-Type":"application/json",...e?.headers}});var Bt={createClient:(e,r={})=>wt({baseUrl:e.env.baseUrl,...r,headers:{Authorization:e.apiKey,...r.headers}}),general:{searchBalances:St,getBalances:ct,getBalance:lt,estimateGas:it},stakingTemplates:{reputation:{createPlatform:pe,createPool:ne,getReward:te,partialUnstake:re,restake:oe,stake:se,unstake:ae,getCreatePoolEvent:ee,getPlatformDeployEvent:Z,getStakeEvent:$},reputationLock:{createPlatform:Ee,createPool:Ve,getReward:Se,partialUnstake:ke,restake:Re,stake:Te,unstake:Pe,getCreatePoolEvent:ce,getPlatformDeployEvent:ie,getStakeEvent:le},rwa:{createPlatform:ve,createPool:Fe,getReward:he,notifyRewards:Oe,partialUnstake:we,restake:de,stake:Ge,unstake:fe,getCreatePoolEvent:ue,getPlatformDeployEvent:ge,getStakeEvent:me}},staking:{roles:{getRoles:H,grantRole:Q,searchRoles:X,searchRoleEvents:Y},stakes:{getStake:_,searchStakes:q,searchStakeEvents:z},pools:{getPool:K,searchPools:J},platforms:{getPlatform:U,searchPlatforms:M}},fractions:{market:{deployMarket:xe,deployNidMarket:Ae,deployContinousWithdrawal:Ie,deployContinousWithdrawalNid:be,getMarketDeployedEvent:ye,search:Ce,get:De,initCompilot:Le},roles:{grantRole:Ue,getRoles:Ne},sales:{createFractions:Me,approveSale:Ke,rejectSale:qe,recover:ze,completeSale:_e,purchaseSale:Qe,activity:st,statistics:at,withdrawPaymentToken:Xe,receiveFundsAfterNonFunded:Ye,getFractionsCreatedEvent:Je,search:ot,getWithdrawEvent:pt,setFeeCapLimit:nt,unlockWrappedAssets:He,checkAndJumpToNonFunded:Ze,receiveNonPurchased:$e,vesting:{claim:tt,getClaimVestedTokensEvent:rt,editCliff:et}},approvals:{approveWrapper:We,approveWrapperToSpendErc20:Be,approveWrapperToSpendErc721:je},compilot:{getAuthData:s,getNonce:o,erc20:a,erc1967Proxy:i,erc20Mint:n,erc20Burn:p},issuance:{getAuthData:s,getNonce:o,erc20:a,erc1967Proxy:i,erc20Mint:n,erc20Burn:p,erc20Approve:kt,erc20Transfer:Rt,erc20GrantRole:Tt,erc20RenounceRole:Pt}}};import{apiEnvs as dt,getApiEnv as Gt}from"@evergonlabs/tmi-protocol-shared/envs";var Jt=dt,Kt=Gt;function zt(e){if(e.error)throw e.error;if(!e.data)throw new Error("No response provided from the API");return e.data}export{Bt as api,Jt as envs,Kt as getEnv,zt as handleApiResponse};
1
+ import{createClient as wt}from"@hey-api/client-fetch";var l=e=>(e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),c=async e=>(e=l(e),e),S=async e=>(e=e.map(r=>l(r)),e),k=e=>(e.poolId=BigInt(e.poolId.toString()),e.createdAt=new Date(e.createdAt),e),R=async e=>(e=e.map(r=>k(r)),e),T=async e=>(e=k(e),e),P=e=>(e.poolId&&(e.poolId=BigInt(e.poolId.toString())),e.stakeId=BigInt(e.stakeId.toString()),e.activePackets=BigInt(e.activePackets.toString()),e.rewardsClaimed=BigInt(e.rewardsClaimed.toString()),e.unlockTimestamp=new Date(e.unlockTimestamp),e.startTimestamp=new Date(e.startTimestamp),e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),V=async e=>(e=e.map(r=>P(r)),e),Vt=e=>(e.poolId&&(e.poolId=BigInt(e.poolId.toString())),e.stakeId=BigInt(e.stakeId.toString()),e.createdAt=new Date(e.createdAt),e),E=async e=>(e=e.map(r=>Vt(r)),e),g=async e=>(e=P(e),e),m=e=>(e.poolId&&(e.poolId=BigInt(e.poolId.toString())),e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),u=async e=>(e=e.map(r=>m(r)),e),h=async e=>(e=e.map(r=>m(r)),e),w=async e=>(e.poolId=BigInt(e.poolId.toString()),e.stakeId=BigInt(e.stakeId.toString()),e),d=async e=>(e.poolId=BigInt(e.poolId.toString()),e),G=async e=>(e.poolId=BigInt(e.poolId.toString()),e.stakeId=BigInt(e.stakeId.toString()),e),f=async e=>(e.poolId=BigInt(e.poolId.toString()),e),F=async e=>(e.poolId=BigInt(e.poolId.toString()),e.stakeId=BigInt(e.stakeId.toString()),e),v=async e=>(e.poolId=BigInt(e.poolId.toString()),e),O=e=>(e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e),D=async e=>(e=O(e),e),C=async e=>(e=e.map(r=>O(r)),e),y=async e=>(e.nftId=BigInt(e.nftId.toString()),e.campaignId=BigInt(e.campaignId.toString()),e.fractionsCreated=BigInt(e.fractionsCreated.toString()),e),Et=e=>{return e.timeline.startDate=new Date(e.timeline.startDate),e.timeline.endDate=new Date(e.timeline.endDate),e.timeline;return e.vesting.cliffDate=new Date(e.vesting.cliffDate),e.vesting;return e.wrappedAssets=e.wrappedAssets.map(r=>(r.wrappedAmount=BigInt(r.wrappedAmount.toString()),r)),e.fundingAssets=e.fundingAssets.map(r=>(r.amountPerPacket=BigInt(r.amountPerPacket.toString()),r)),e.createdAt=new Date(e.createdAt),e.updatedAt=new Date(e.updatedAt),e};var x=async e=>(e.campaignId=BigInt(e.campaignId.toString()),e.burnId=BigInt(e.burnId.toString()),e.nextBurnId=BigInt(e.nextBurnId.toString()),e.amountOfFractionsBurnt=BigInt(e.amountOfFractionsBurnt.toString()),e),A=async e=>(e=e.map(r=>Et(r)),e),I=async e=>(e.campaignId=BigInt(e.campaignId.toString()),e.packetsReceived=BigInt(e.packetsReceived.toString()),e),L=async e=>(e.nonce=BigInt(e.nonce.toString()),e.blockExpiration=BigInt(e.blockExpiration.toString()),e),gt=e=>(e.value=BigInt(e.value.toString()),e),b=async e=>(e=gt(e),e),W=async e=>(e.balance=BigInt(e.balance.toString()),e),B=e=>(e.tokenId&&(e.tokenId=BigInt(e.tokenId.toString())),e),j=async e=>(e=e.map(r=>B(r)),e),mt=e=>(e.balances=e.balances.map(r=>B(r)),e),N=async e=>(e=mt(e),e);import{createClient as ut,createConfig as ht}from"@hey-api/client-fetch";var t=ut(ht({baseUrl:"http://localhost:3000"}));var U=e=>(e.client??t).get({responseTransformer:c,url:"/staking/platforms/get/v0",...e}),M=e=>(e?.client??t).post({responseTransformer:S,url:"/staking/platforms/search/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),J=e=>(e?.client??t).post({responseTransformer:R,url:"/staking/pools/searchPools/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),K=e=>(e.client??t).get({responseTransformer:T,url:"/staking/pools/getPool/v0",...e}),q=e=>(e?.client??t).post({responseTransformer:V,url:"/staking/stakes/searchStakes/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),z=e=>(e?.client??t).post({responseTransformer:E,url:"/staking/stakes/searchStakeEvents/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),_=e=>(e.client??t).get({responseTransformer:g,url:"/staking/stakes/getStake/v0",...e}),H=e=>(e?.client??t).get({url:"/staking/roles/getRoles/v0",...e}),Q=e=>(e?.client??t).post({url:"/staking/roles/grantRole/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),X=e=>(e?.client??t).post({responseTransformer:u,url:"/staking/roles/searchRoles/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Y=e=>(e?.client??t).post({responseTransformer:h,url:"/staking/roles/searchRoleEvents/v0",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Z=e=>(e.client??t).get({url:"/stakingTemplates/reputation/v0/getPlatformDeployEvent",...e}),$=e=>(e.client??t).get({responseTransformer:w,url:"/stakingTemplates/reputation/v0/getStakeEvent",...e}),ee=e=>(e.client??t).get({responseTransformer:d,url:"/stakingTemplates/reputation/v0/getCreatePoolEvent",...e}),te=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/getReward",...e,headers:{"Content-Type":"application/json",...e?.headers}}),re=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/partialUnstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),oe=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/restake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),se=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/stake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ae=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/unstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ne=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/createPool",...e,headers:{"Content-Type":"application/json",...e?.headers}}),pe=e=>(e?.client??t).post({url:"/stakingTemplates/reputation/v0/createPlatform",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ie=e=>(e.client??t).get({url:"/stakingTemplates/reputationLock/v0/getPlatformDeployEvent",...e}),le=e=>(e.client??t).get({responseTransformer:G,url:"/stakingTemplates/reputationLock/v0/getStakeEvent",...e}),ce=e=>(e.client??t).get({responseTransformer:f,url:"/stakingTemplates/reputationLock/v0/getCreatePoolEvent",...e}),Se=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/getReward",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ke=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/partialUnstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Re=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/restake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Te=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/stake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Pe=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/unstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ve=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/createPool",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ee=e=>(e?.client??t).post({url:"/stakingTemplates/reputationLock/v0/createPlatform",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e.client??t).get({url:"/stakingTemplates/rwa/v0/getPlatformDeployEvent",...e}),me=e=>(e.client??t).get({responseTransformer:F,url:"/stakingTemplates/rwa/v0/getStakeEvent",...e}),ue=e=>(e.client??t).get({responseTransformer:v,url:"/stakingTemplates/rwa/v0/getCreatePoolEvent",...e}),he=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/getReward",...e,headers:{"Content-Type":"application/json",...e?.headers}}),we=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/partialUnstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),de=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/restake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ge=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/stake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),fe=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/unstake",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Fe=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/createPool",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ve=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/createPlatform",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Oe=e=>(e?.client??t).post({url:"/stakingTemplates/rwa/v0/notifyRewards",...e,headers:{"Content-Type":"application/json",...e?.headers}}),De=e=>(e.client??t).get({responseTransformer:D,url:"/v0/fractions/markets/get",...e}),Ce=e=>(e?.client??t).post({responseTransformer:C,url:"/v0/fractions/markets/search",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ye=e=>(e.client??t).get({url:"/v0/fractions/markets/deployEvent",...e}),xe=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deploy",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ae=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deployNid",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ie=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deployContinuousWithdraw",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Le=e=>(e?.client??t).post({url:"/v0/fractions/platforms/deployContinuousWithdrawNid",...e,headers:{"Content-Type":"application/json",...e?.headers}}),be=e=>(e.client??t).get({url:"/v0/fractions/platforms/initCompilot",...e}),We=e=>(e?.client??t).post({url:"/v0/fractions/fractions/approveWrapper",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Be=e=>(e?.client??t).post({url:"/v0/fractions/fractions/approveWrapperAsErc20Spender",...e,headers:{"Content-Type":"application/json",...e?.headers}}),je=e=>(e?.client??t).post({url:"/v0/fractions/fractions/approveWrapperAsErc721Spender",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ne=e=>(e?.client??t).get({url:"/v0/fractions/roles",...e}),Ue=e=>(e?.client??t).post({url:"/v0/fractions/roles/grant",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Me=e=>(e?.client??t).post({url:"/v0/fractions/sales/fractions",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Je=e=>(e.client??t).get({responseTransformer:y,url:"/v0/fractions/sales/getFractionsCreatedEvent",...e}),Ke=e=>(e?.client??t).post({url:"/v0/fractions/sales/approve",...e,headers:{"Content-Type":"application/json",...e?.headers}}),qe=e=>(e?.client??t).post({url:"/v0/fractions/sales/reject",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ze=e=>(e?.client??t).post({url:"/v0/fractions/sales/recover",...e,headers:{"Content-Type":"application/json",...e?.headers}}),_e=e=>(e?.client??t).post({url:"/v0/fractions/sales/complete",...e,headers:{"Content-Type":"application/json",...e?.headers}}),He=e=>(e?.client??t).post({url:"/v0/fractions/sales/unlockWrappedAssets",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Qe=e=>(e?.client??t).post({url:"/v0/fractions/sales/purchase",...e,headers:{"Content-Type":"application/json",...e?.headers}});var Xe=e=>(e?.client??t).post({url:"/v0/fractions/sales/withdrawPaymentToken",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ye=e=>(e?.client??t).post({url:"/v0/fractions/sales/receiveFundsAfterNonFunded",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ze=e=>(e?.client??t).post({url:"/v0/fractions/sales/checkAndJumpToNonFunded",...e,headers:{"Content-Type":"application/json",...e?.headers}}),$e=e=>(e?.client??t).post({url:"/v0/fractions/sales/receiveNonPurchasedWrappedAssets",...e,headers:{"Content-Type":"application/json",...e?.headers}}),et=e=>(e?.client??t).post({url:"/v0/fractions/sales/vesting/editCliff",...e,headers:{"Content-Type":"application/json",...e?.headers}}),tt=e=>(e?.client??t).post({url:"/v0/fractions/sales/vesting/claim",...e,headers:{"Content-Type":"application/json",...e?.headers}}),rt=e=>(e.client??t).get({responseTransformer:x,url:"/v0/fractions/sales/vesting/getClaimVestedTokensEvent",...e}),ot=e=>(e?.client??t).post({responseTransformer:A,url:"/v0/fractions/sales/search",...e,headers:{"Content-Type":"application/json",...e?.headers}}),st=e=>(e?.client??t).post({url:"/v0/fractions/sales/activity",...e,headers:{"Content-Type":"application/json",...e?.headers}}),at=e=>(e?.client??t).post({url:"/v0/fractions/sales/statistics",...e,headers:{"Content-Type":"application/json",...e?.headers}}),nt=e=>(e?.client??t).post({url:"/v0/fractions/sales/setFeeCapLimit",...e,headers:{"Content-Type":"application/json",...e?.headers}}),pt=e=>(e.client??t).get({responseTransformer:I,url:"/v0/fractions/sales/getWithdrawEvent",...e});var o=e=>(e?.client??t).post({url:"/v0/fractions/sig/nonce",...e,headers:{"Content-Type":"application/json",...e?.headers}}),s=e=>(e?.client??t).post({responseTransformer:L,url:"/v0/fractions/sig/authData",...e,headers:{"Content-Type":"application/json",...e?.headers}}),it=e=>(e?.client??t).post({responseTransformer:b,url:"/general/estimateGas",...e,headers:{"Content-Type":"application/json",...e?.headers}}),lt=e=>(e.client??t).get({responseTransformer:W,url:"/general/balance",...e}),ct=e=>(e?.client??t).post({responseTransformer:j,url:"/general/balances",...e,headers:{"Content-Type":"application/json",...e?.headers}}),St=e=>(e?.client??t).post({responseTransformer:N,url:"/general/searchBalances",...e,headers:{"Content-Type":"application/json",...e?.headers}}),a=e=>(e?.client??t).get({url:"/issuance/erc20",...e}),n=e=>(e?.client??t).post({url:"/issuance/erc20/mint",...e,headers:{"Content-Type":"application/json",...e?.headers}}),p=e=>(e?.client??t).post({url:"/issuance/erc20/burn",...e,headers:{"Content-Type":"application/json",...e?.headers}}),kt=e=>(e?.client??t).post({url:"/issuance/erc20/approve",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Rt=e=>(e?.client??t).post({url:"/issuance/erc20/transfer",...e,headers:{"Content-Type":"application/json",...e?.headers}}),i=e=>(e?.client??t).post({url:"/issuance/erc20/proxy",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Tt=e=>(e?.client??t).post({url:"/issuance/erc20/grantRole",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Pt=e=>(e?.client??t).post({url:"/issuance/erc20/renounceRole",...e,headers:{"Content-Type":"application/json",...e?.headers}});var Bt={createClient:(e,r={})=>wt({baseUrl:e.env.baseUrl,...r,headers:{Authorization:e.apiKey,...r.headers}}),general:{searchBalances:St,getBalances:ct,getBalance:lt,estimateGas:it},stakingTemplates:{reputation:{createPlatform:pe,createPool:ne,getReward:te,partialUnstake:re,restake:oe,stake:se,unstake:ae,getCreatePoolEvent:ee,getPlatformDeployEvent:Z,getStakeEvent:$},reputationLock:{createPlatform:Ee,createPool:Ve,getReward:Se,partialUnstake:ke,restake:Re,stake:Te,unstake:Pe,getCreatePoolEvent:ce,getPlatformDeployEvent:ie,getStakeEvent:le},rwa:{createPlatform:ve,createPool:Fe,getReward:he,notifyRewards:Oe,partialUnstake:we,restake:de,stake:Ge,unstake:fe,getCreatePoolEvent:ue,getPlatformDeployEvent:ge,getStakeEvent:me}},staking:{roles:{getRoles:H,grantRole:Q,searchRoles:X,searchRoleEvents:Y},stakes:{getStake:_,searchStakes:q,searchStakeEvents:z},pools:{getPool:K,searchPools:J},platforms:{getPlatform:U,searchPlatforms:M}},fractions:{market:{deployMarket:xe,deployNidMarket:Ae,deployContinousWithdrawal:Ie,deployContinousWithdrawalNid:Le,getMarketDeployedEvent:ye,search:Ce,get:De,initCompilot:be},roles:{grantRole:Ue,getRoles:Ne},sales:{createFractions:Me,approveSale:Ke,rejectSale:qe,recover:ze,completeSale:_e,purchaseSale:Qe,activity:st,statistics:at,withdrawPaymentToken:Xe,receiveFundsAfterNonFunded:Ye,getFractionsCreatedEvent:Je,search:ot,getWithdrawEvent:pt,setFeeCapLimit:nt,unlockWrappedAssets:He,checkAndJumpToNonFunded:Ze,receiveNonPurchased:$e,vesting:{claim:tt,getClaimVestedTokensEvent:rt,editCliff:et}},approvals:{approveWrapper:We,approveWrapperToSpendErc20:Be,approveWrapperToSpendErc721:je},compilot:{getAuthData:s,getNonce:o,erc20:a,erc1967Proxy:i,erc20Mint:n,erc20Burn:p},issuance:{getAuthData:s,getNonce:o,erc20:a,erc1967Proxy:i,erc20Mint:n,erc20Burn:p,erc20Approve:kt,erc20Transfer:Rt,erc20GrantRole:Tt,erc20RenounceRole:Pt}}};import{apiEnvs as dt,getApiEnv as Gt}from"@evergonlabs/tmi-protocol-shared/envs";var Jt=dt,Kt=Gt;function zt(e){if(e.error)throw e.error;if(!e.data)throw new Error("No response provided from the API");return e.data}export{Bt as api,Jt as envs,Kt as getEnv,zt as handleApiResponse};
2
2
  //# sourceMappingURL=index.js.map