@reflectmoney/stable.ts 1.1.2 → 1.1.4

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 (175) hide show
  1. package/dist/classes/ApiClient.d.ts +56 -0
  2. package/dist/classes/PdaClient.d.ts +131 -0
  3. package/dist/classes/Reflect.d.ts +7 -0
  4. package/dist/classes/ReflectKeeper.d.ts +105 -0
  5. package/dist/classes/ReflectTokenisedBond.d.ts +75 -0
  6. package/dist/classes/Stablecoin.d.ts +219 -0
  7. package/dist/classes/index.d.ts +4 -0
  8. package/dist/constants/drift.d.ts +6 -0
  9. package/dist/constants/index.d.ts +8 -0
  10. package/dist/constants/jupiter.d.ts +4 -0
  11. package/dist/constants/lookupTables.d.ts +4 -0
  12. package/dist/constants/lst.d.ts +3 -0
  13. package/dist/constants/pyth.d.ts +1 -0
  14. package/dist/constants/usdc.d.ts +6 -0
  15. package/dist/constants/wsol.d.ts +6 -0
  16. package/dist/errors/ReflectError.d.ts +4 -0
  17. package/dist/generated/reflect_main/accounts/DriftJlpController.d.ts +114 -0
  18. package/dist/generated/reflect_main/accounts/DriftLstController.d.ts +108 -0
  19. package/dist/generated/reflect_main/accounts/DriftUsdcController.d.ts +126 -0
  20. package/dist/generated/reflect_main/accounts/Main.d.ts +110 -0
  21. package/dist/generated/reflect_main/accounts/PerpMarket.d.ts +226 -0
  22. package/dist/generated/reflect_main/accounts/PrelaunchOracle.d.ts +130 -0
  23. package/dist/generated/reflect_main/accounts/PythLazerOracle.d.ts +124 -0
  24. package/dist/generated/reflect_main/accounts/RebalanceLst.d.ts +111 -0
  25. package/dist/generated/reflect_main/accounts/SpotMarket.d.ts +377 -0
  26. package/dist/generated/reflect_main/accounts/User.d.ts +221 -0
  27. package/dist/generated/reflect_main/accounts/UserPermissions.d.ts +106 -0
  28. package/dist/generated/reflect_main/accounts/UserStats.d.ts +211 -0
  29. package/dist/generated/reflect_main/accounts/index.d.ts +38 -0
  30. package/dist/generated/reflect_main/errors/index.d.ts +969 -0
  31. package/dist/generated/reflect_main/index.d.ts +19 -0
  32. package/dist/generated/reflect_main/instructions/addLstDrift.d.ts +49 -0
  33. package/dist/generated/reflect_main/instructions/addSubAccount.d.ts +54 -0
  34. package/dist/generated/reflect_main/instructions/captureSpreadDrift.d.ts +66 -0
  35. package/dist/generated/reflect_main/instructions/captureSpreadDriftS1.d.ts +58 -0
  36. package/dist/generated/reflect_main/instructions/createAdminAccount.d.ts +51 -0
  37. package/dist/generated/reflect_main/instructions/createUserStatsAccount.d.ts +52 -0
  38. package/dist/generated/reflect_main/instructions/depositDrift.d.ts +73 -0
  39. package/dist/generated/reflect_main/instructions/freezeProgram.d.ts +54 -0
  40. package/dist/generated/reflect_main/instructions/freezeProtocolAction.d.ts +55 -0
  41. package/dist/generated/reflect_main/instructions/freezeStrategyAction.d.ts +58 -0
  42. package/dist/generated/reflect_main/instructions/index.d.ts +34 -0
  43. package/dist/generated/reflect_main/instructions/initDriftAccountsS1.d.ts +54 -0
  44. package/dist/generated/reflect_main/instructions/initDriftControllerS1.d.ts +58 -0
  45. package/dist/generated/reflect_main/instructions/initDriftControllerS3.d.ts +58 -0
  46. package/dist/generated/reflect_main/instructions/initMain.d.ts +43 -0
  47. package/dist/generated/reflect_main/instructions/mintDriftS1.d.ts +86 -0
  48. package/dist/generated/reflect_main/instructions/mintDriftS3.d.ts +86 -0
  49. package/dist/generated/reflect_main/instructions/processSwapDeposit.d.ts +69 -0
  50. package/dist/generated/reflect_main/instructions/processSwapWithdraw.d.ts +69 -0
  51. package/dist/generated/reflect_main/instructions/redeemDriftS1.d.ts +87 -0
  52. package/dist/generated/reflect_main/instructions/redeemDriftS3.d.ts +87 -0
  53. package/dist/generated/reflect_main/instructions/settlePnl.d.ts +55 -0
  54. package/dist/generated/reflect_main/instructions/settlePnlMulti.d.ts +65 -0
  55. package/dist/generated/reflect_main/instructions/suspendSplProtocol.d.ts +54 -0
  56. package/dist/generated/reflect_main/instructions/suspendSplStrategy.d.ts +56 -0
  57. package/dist/generated/reflect_main/instructions/swapOrca.d.ts +81 -0
  58. package/dist/generated/reflect_main/instructions/swapOrcaTwoHop.d.ts +101 -0
  59. package/dist/generated/reflect_main/instructions/updateActionRoleProtocol.d.ts +58 -0
  60. package/dist/generated/reflect_main/instructions/updateActionRoleStrategy.d.ts +60 -0
  61. package/dist/generated/reflect_main/instructions/updateAttenuation.d.ts +57 -0
  62. package/dist/generated/reflect_main/instructions/updateCap.d.ts +55 -0
  63. package/dist/generated/reflect_main/instructions/updateRebalanceSlippage.d.ts +55 -0
  64. package/dist/generated/reflect_main/instructions/updateRecipients.d.ts +56 -0
  65. package/dist/generated/reflect_main/instructions/updateRoleHolderProtocol.d.ts +60 -0
  66. package/dist/generated/reflect_main/instructions/updateRoleHolderStrategy.d.ts +60 -0
  67. package/dist/generated/reflect_main/types/AMM.d.ts +102 -0
  68. package/dist/generated/reflect_main/types/AccKey.d.ts +15 -0
  69. package/dist/generated/reflect_main/types/AccessControl.d.ts +18 -0
  70. package/dist/generated/reflect_main/types/AccessMap.d.ts +17 -0
  71. package/dist/generated/reflect_main/types/Action.d.ts +35 -0
  72. package/dist/generated/reflect_main/types/ActionMapping.d.ts +19 -0
  73. package/dist/generated/reflect_main/types/AssetTier.d.ts +23 -0
  74. package/dist/generated/reflect_main/types/Attenuation.d.ts +16 -0
  75. package/dist/generated/reflect_main/types/BalanceType.d.ts +20 -0
  76. package/dist/generated/reflect_main/types/Capture.d.ts +17 -0
  77. package/dist/generated/reflect_main/types/ContractTier.d.ts +24 -0
  78. package/dist/generated/reflect_main/types/ContractType.d.ts +20 -0
  79. package/dist/generated/reflect_main/types/CorpAction.d.ts +19 -0
  80. package/dist/generated/reflect_main/types/CustodyInfo.d.ts +20 -0
  81. package/dist/generated/reflect_main/types/DirectionCollateral.d.ts +20 -0
  82. package/dist/generated/reflect_main/types/DirectionPosition.d.ts +20 -0
  83. package/dist/generated/reflect_main/types/DriftControllerBase.d.ts +15 -0
  84. package/dist/generated/reflect_main/types/DriftJlpControllerFixedAccounts.d.ts +18 -0
  85. package/dist/generated/reflect_main/types/DriftLstData.d.ts +17 -0
  86. package/dist/generated/reflect_main/types/Ema.d.ts +17 -0
  87. package/dist/generated/reflect_main/types/Externals.d.ts +16 -0
  88. package/dist/generated/reflect_main/types/FlowControl.d.ts +17 -0
  89. package/dist/generated/reflect_main/types/HistoricalIndexData.d.ts +19 -0
  90. package/dist/generated/reflect_main/types/HistoricalOracleData.d.ts +20 -0
  91. package/dist/generated/reflect_main/types/Holding.d.ts +21 -0
  92. package/dist/generated/reflect_main/types/Holdings.d.ts +17 -0
  93. package/dist/generated/reflect_main/types/InsuranceClaim.d.ts +19 -0
  94. package/dist/generated/reflect_main/types/InsuranceFund.d.ts +24 -0
  95. package/dist/generated/reflect_main/types/JlpRebalanceSettings.d.ts +15 -0
  96. package/dist/generated/reflect_main/types/KillSwitch.d.ts +15 -0
  97. package/dist/generated/reflect_main/types/LevelRoles.d.ts +16 -0
  98. package/dist/generated/reflect_main/types/MarketStatus.d.ts +27 -0
  99. package/dist/generated/reflect_main/types/MarketType.d.ts +20 -0
  100. package/dist/generated/reflect_main/types/ModifyOrderParams.d.ts +32 -0
  101. package/dist/generated/reflect_main/types/ModifyOrderPolicy.d.ts +20 -0
  102. package/dist/generated/reflect_main/types/Movements.d.ts +19 -0
  103. package/dist/generated/reflect_main/types/OracleGuardRails.d.ts +18 -0
  104. package/dist/generated/reflect_main/types/OracleSource.d.ts +34 -0
  105. package/dist/generated/reflect_main/types/OracleValidity.d.ts +25 -0
  106. package/dist/generated/reflect_main/types/Order.d.ts +43 -0
  107. package/dist/generated/reflect_main/types/OrderDirection.d.ts +20 -0
  108. package/dist/generated/reflect_main/types/OrderParams.d.ts +36 -0
  109. package/dist/generated/reflect_main/types/OrderStatus.d.ts +22 -0
  110. package/dist/generated/reflect_main/types/OrderTriggerCondition.d.ts +22 -0
  111. package/dist/generated/reflect_main/types/OrderType.d.ts +23 -0
  112. package/dist/generated/reflect_main/types/PermissionLevel.d.ts +45 -0
  113. package/dist/generated/reflect_main/types/PerpHedge.d.ts +17 -0
  114. package/dist/generated/reflect_main/types/PerpPosition.d.ts +29 -0
  115. package/dist/generated/reflect_main/types/PoolBalance.d.ts +17 -0
  116. package/dist/generated/reflect_main/types/Position.d.ts +20 -0
  117. package/dist/generated/reflect_main/types/PositionDirection.d.ts +20 -0
  118. package/dist/generated/reflect_main/types/PositionDrift.d.ts +18 -0
  119. package/dist/generated/reflect_main/types/PostOnlyParam.d.ts +22 -0
  120. package/dist/generated/reflect_main/types/Price.d.ts +41 -0
  121. package/dist/generated/reflect_main/types/PriceComp.d.ts +19 -0
  122. package/dist/generated/reflect_main/types/PriceDivergenceGuardRails.d.ts +16 -0
  123. package/dist/generated/reflect_main/types/PriceInfo.d.ts +21 -0
  124. package/dist/generated/reflect_main/types/PriceStatus.d.ts +22 -0
  125. package/dist/generated/reflect_main/types/PriceType.d.ts +20 -0
  126. package/dist/generated/reflect_main/types/Program.d.ts +19 -0
  127. package/dist/generated/reflect_main/types/ProgramStatus.d.ts +20 -0
  128. package/dist/generated/reflect_main/types/Recipient.d.ts +17 -0
  129. package/dist/generated/reflect_main/types/Recipients.d.ts +17 -0
  130. package/dist/generated/reflect_main/types/Role.d.ts +25 -0
  131. package/dist/generated/reflect_main/types/ShiftCollateral.d.ts +19 -0
  132. package/dist/generated/reflect_main/types/ShiftPosition.d.ts +17 -0
  133. package/dist/generated/reflect_main/types/ShortHolding.d.ts +17 -0
  134. package/dist/generated/reflect_main/types/SplBase.d.ts +17 -0
  135. package/dist/generated/reflect_main/types/SplMain.d.ts +22 -0
  136. package/dist/generated/reflect_main/types/Spls.d.ts +17 -0
  137. package/dist/generated/reflect_main/types/SpotBalanceType.d.ts +20 -0
  138. package/dist/generated/reflect_main/types/SpotPosition.d.ts +23 -0
  139. package/dist/generated/reflect_main/types/Status.d.ts +21 -0
  140. package/dist/generated/reflect_main/types/Strategy.d.ts +32 -0
  141. package/dist/generated/reflect_main/types/StrategyPadding.d.ts +15 -0
  142. package/dist/generated/reflect_main/types/StrategyRoleEntry.d.ts +17 -0
  143. package/dist/generated/reflect_main/types/SubAccount.d.ts +17 -0
  144. package/dist/generated/reflect_main/types/Update.d.ts +20 -0
  145. package/dist/generated/reflect_main/types/UserFees.d.ts +20 -0
  146. package/dist/generated/reflect_main/types/ValidityGuardRails.d.ts +18 -0
  147. package/dist/generated/reflect_main/types/index.d.ts +80 -0
  148. package/dist/generated/reflect_tokenised_bonds/accounts/Admin.d.ts +99 -0
  149. package/dist/generated/reflect_tokenised_bonds/accounts/Config.d.ts +106 -0
  150. package/dist/generated/reflect_tokenised_bonds/accounts/Vault.d.ts +114 -0
  151. package/dist/generated/reflect_tokenised_bonds/accounts/index.d.ts +11 -0
  152. package/dist/generated/reflect_tokenised_bonds/errors/index.d.ts +144 -0
  153. package/dist/generated/reflect_tokenised_bonds/index.d.ts +19 -0
  154. package/dist/generated/reflect_tokenised_bonds/instructions/createVault.d.ts +50 -0
  155. package/dist/generated/reflect_tokenised_bonds/instructions/deposit.d.ts +62 -0
  156. package/dist/generated/reflect_tokenised_bonds/instructions/index.d.ts +4 -0
  157. package/dist/generated/reflect_tokenised_bonds/instructions/initialize.d.ts +43 -0
  158. package/dist/generated/reflect_tokenised_bonds/instructions/withdraw.d.ts +62 -0
  159. package/dist/generated/reflect_tokenised_bonds/types/DepositArgs.d.ts +17 -0
  160. package/dist/generated/reflect_tokenised_bonds/types/Permissions.d.ts +21 -0
  161. package/dist/generated/reflect_tokenised_bonds/types/WithdrawArgs.d.ts +16 -0
  162. package/dist/generated/reflect_tokenised_bonds/types/index.d.ts +3 -0
  163. package/dist/helpers/getOrcaQuote.d.ts +3 -0
  164. package/dist/idl/perpetuals.d.ts +5771 -0
  165. package/dist/index.d.ts +9 -0
  166. package/dist/index.js +1 -0
  167. package/dist/stablecoins/LstStablecoin.d.ts +103 -0
  168. package/dist/stablecoins/UsdcPlusStablecoin.d.ts +86 -0
  169. package/dist/stablecoins/UsdjStablecoin.d.ts +1 -0
  170. package/dist/stablecoins/index.d.ts +3 -0
  171. package/dist/types/api.d.ts +1172 -0
  172. package/dist/types/api.js +6 -0
  173. package/dist/types/index.d.ts +81 -0
  174. package/dist/types/index.js +2 -0
  175. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ export type StrategyPadding = {
9
+ reserved: number[];
10
+ };
11
+ /**
12
+ * @category userTypes
13
+ * @category generated
14
+ */
15
+ export declare const strategyPaddingBeet: beet.BeetArgsStruct<StrategyPadding>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ import { LevelRoles } from './LevelRoles';
9
+ export type StrategyRoleEntry = {
10
+ strategyId: number;
11
+ roles: LevelRoles;
12
+ };
13
+ /**
14
+ * @category userTypes
15
+ * @category generated
16
+ */
17
+ export declare const strategyRoleEntryBeet: beet.FixableBeetArgsStruct<StrategyRoleEntry>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ export type SubAccount = {
9
+ subAccountIdx: number;
10
+ lstsLoaded: number;
11
+ driftTokenLoaded: boolean;
12
+ };
13
+ /**
14
+ * @category userTypes
15
+ * @category generated
16
+ */
17
+ export declare const subAccountBeet: beet.BeetArgsStruct<SubAccount>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ /**
9
+ * @category enums
10
+ * @category generated
11
+ */
12
+ export declare enum Update {
13
+ Add = 0,
14
+ Remove = 1
15
+ }
16
+ /**
17
+ * @category userTypes
18
+ * @category generated
19
+ */
20
+ export declare const updateBeet: beet.FixedSizeBeet<Update, Update>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ export type UserFees = {
9
+ totalFeePaid: beet.bignum;
10
+ totalFeeRebate: beet.bignum;
11
+ totalTokenDiscount: beet.bignum;
12
+ totalRefereeDiscount: beet.bignum;
13
+ totalReferrerReward: beet.bignum;
14
+ currentEpochReferrerReward: beet.bignum;
15
+ };
16
+ /**
17
+ * @category userTypes
18
+ * @category generated
19
+ */
20
+ export declare const userFeesBeet: beet.BeetArgsStruct<UserFees>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ export type ValidityGuardRails = {
9
+ slotsBeforeStaleForAmm: beet.bignum;
10
+ slotsBeforeStaleForMargin: beet.bignum;
11
+ confidenceIntervalMaxSize: beet.bignum;
12
+ tooVolatileRatio: beet.bignum;
13
+ };
14
+ /**
15
+ * @category userTypes
16
+ * @category generated
17
+ */
18
+ export declare const validityGuardRailsBeet: beet.BeetArgsStruct<ValidityGuardRails>;
@@ -0,0 +1,80 @@
1
+ export * from './AMM';
2
+ export * from './AccKey';
3
+ export * from './AccessControl';
4
+ export * from './AccessMap';
5
+ export * from './Action';
6
+ export * from './ActionMapping';
7
+ export * from './AssetTier';
8
+ export * from './Attenuation';
9
+ export * from './BalanceType';
10
+ export * from './Capture';
11
+ export * from './ContractTier';
12
+ export * from './ContractType';
13
+ export * from './CorpAction';
14
+ export * from './CustodyInfo';
15
+ export * from './DirectionCollateral';
16
+ export * from './DirectionPosition';
17
+ export * from './DriftControllerBase';
18
+ export * from './DriftJlpControllerFixedAccounts';
19
+ export * from './DriftLstData';
20
+ export * from './Ema';
21
+ export * from './Externals';
22
+ export * from './FlowControl';
23
+ export * from './HistoricalIndexData';
24
+ export * from './HistoricalOracleData';
25
+ export * from './Holding';
26
+ export * from './Holdings';
27
+ export * from './InsuranceClaim';
28
+ export * from './InsuranceFund';
29
+ export * from './JlpRebalanceSettings';
30
+ export * from './KillSwitch';
31
+ export * from './LevelRoles';
32
+ export * from './MarketStatus';
33
+ export * from './MarketType';
34
+ export * from './ModifyOrderParams';
35
+ export * from './ModifyOrderPolicy';
36
+ export * from './Movements';
37
+ export * from './OracleGuardRails';
38
+ export * from './OracleSource';
39
+ export * from './OracleValidity';
40
+ export * from './Order';
41
+ export * from './OrderDirection';
42
+ export * from './OrderParams';
43
+ export * from './OrderStatus';
44
+ export * from './OrderTriggerCondition';
45
+ export * from './OrderType';
46
+ export * from './PermissionLevel';
47
+ export * from './PerpHedge';
48
+ export * from './PerpPosition';
49
+ export * from './PoolBalance';
50
+ export * from './Position';
51
+ export * from './PositionDirection';
52
+ export * from './PositionDrift';
53
+ export * from './PostOnlyParam';
54
+ export * from './Price';
55
+ export * from './PriceComp';
56
+ export * from './PriceDivergenceGuardRails';
57
+ export * from './PriceInfo';
58
+ export * from './PriceStatus';
59
+ export * from './PriceType';
60
+ export * from './Program';
61
+ export * from './ProgramStatus';
62
+ export * from './Recipient';
63
+ export * from './Recipients';
64
+ export * from './Role';
65
+ export * from './ShiftCollateral';
66
+ export * from './ShiftPosition';
67
+ export * from './ShortHolding';
68
+ export * from './SplBase';
69
+ export * from './SplMain';
70
+ export * from './Spls';
71
+ export * from './SpotBalanceType';
72
+ export * from './SpotPosition';
73
+ export * from './Status';
74
+ export * from './Strategy';
75
+ export * from './StrategyPadding';
76
+ export * from './StrategyRoleEntry';
77
+ export * from './SubAccount';
78
+ export * from './Update';
79
+ export * from './UserFees';
80
+ export * from './ValidityGuardRails';
@@ -0,0 +1,99 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as web3 from '@solana/web3.js';
8
+ import * as beetSolana from '@metaplex-foundation/beet-solana';
9
+ import * as beet from '@metaplex-foundation/beet';
10
+ import { Permissions } from '../types/Permissions';
11
+ /**
12
+ * Arguments used to create {@link Admin}
13
+ * @category Accounts
14
+ * @category generated
15
+ */
16
+ export type AdminArgs = {
17
+ pubkey: web3.PublicKey;
18
+ permissions: Permissions[];
19
+ };
20
+ export declare const adminDiscriminator: number[];
21
+ /**
22
+ * Holds the data for the {@link Admin} Account and provides de/serialization
23
+ * functionality for that data
24
+ *
25
+ * @category Accounts
26
+ * @category generated
27
+ */
28
+ export declare class Admin implements AdminArgs {
29
+ readonly pubkey: web3.PublicKey;
30
+ readonly permissions: Permissions[];
31
+ private constructor();
32
+ /**
33
+ * Creates a {@link Admin} instance from the provided args.
34
+ */
35
+ static fromArgs(args: AdminArgs): Admin;
36
+ /**
37
+ * Deserializes the {@link Admin} from the data of the provided {@link web3.AccountInfo}.
38
+ * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
39
+ */
40
+ static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Admin, number];
41
+ /**
42
+ * Retrieves the account info from the provided address and deserializes
43
+ * the {@link Admin} from its data.
44
+ *
45
+ * @throws Error if no account info is found at the address or if deserialization fails
46
+ */
47
+ static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Admin>;
48
+ /**
49
+ * Provides a {@link web3.Connection.getProgramAccounts} config builder,
50
+ * to fetch accounts matching filters that can be specified via that builder.
51
+ *
52
+ * @param programId - the program that owns the accounts we are filtering
53
+ */
54
+ static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<AdminArgs & {
55
+ accountDiscriminator: number[];
56
+ }>;
57
+ /**
58
+ * Deserializes the {@link Admin} from the provided data Buffer.
59
+ * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
60
+ */
61
+ static deserialize(buf: Buffer, offset?: number): [Admin, number];
62
+ /**
63
+ * Serializes the {@link Admin} into a Buffer.
64
+ * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
65
+ */
66
+ serialize(): [Buffer, number];
67
+ /**
68
+ * Returns the byteSize of a {@link Buffer} holding the serialized data of
69
+ * {@link Admin} for the provided args.
70
+ *
71
+ * @param args need to be provided since the byte size for this account
72
+ * depends on them
73
+ */
74
+ static byteSize(args: AdminArgs): number;
75
+ /**
76
+ * Fetches the minimum balance needed to exempt an account holding
77
+ * {@link Admin} data from rent
78
+ *
79
+ * @param args need to be provided since the byte size for this account
80
+ * depends on them
81
+ * @param connection used to retrieve the rent exemption information
82
+ */
83
+ static getMinimumBalanceForRentExemption(args: AdminArgs, connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
84
+ /**
85
+ * Returns a readable version of {@link Admin} properties
86
+ * and can be used to convert to JSON and/or logging
87
+ */
88
+ pretty(): {
89
+ pubkey: string;
90
+ permissions: Permissions[];
91
+ };
92
+ }
93
+ /**
94
+ * @category Accounts
95
+ * @category generated
96
+ */
97
+ export declare const adminBeet: beet.FixableBeetStruct<Admin, AdminArgs & {
98
+ accountDiscriminator: number[];
99
+ }>;
@@ -0,0 +1,106 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ import * as web3 from '@solana/web3.js';
9
+ import * as beetSolana from '@metaplex-foundation/beet-solana';
10
+ /**
11
+ * Arguments used to create {@link Config}
12
+ * @category Accounts
13
+ * @category generated
14
+ */
15
+ export type ConfigArgs = {
16
+ bump: number;
17
+ vaults: beet.bignum;
18
+ frozen: boolean;
19
+ };
20
+ export declare const configDiscriminator: number[];
21
+ /**
22
+ * Holds the data for the {@link Config} Account and provides de/serialization
23
+ * functionality for that data
24
+ *
25
+ * @category Accounts
26
+ * @category generated
27
+ */
28
+ export declare class Config implements ConfigArgs {
29
+ readonly bump: number;
30
+ readonly vaults: beet.bignum;
31
+ readonly frozen: boolean;
32
+ private constructor();
33
+ /**
34
+ * Creates a {@link Config} instance from the provided args.
35
+ */
36
+ static fromArgs(args: ConfigArgs): Config;
37
+ /**
38
+ * Deserializes the {@link Config} from the data of the provided {@link web3.AccountInfo}.
39
+ * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
40
+ */
41
+ static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Config, number];
42
+ /**
43
+ * Retrieves the account info from the provided address and deserializes
44
+ * the {@link Config} from its data.
45
+ *
46
+ * @throws Error if no account info is found at the address or if deserialization fails
47
+ */
48
+ static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Config>;
49
+ /**
50
+ * Provides a {@link web3.Connection.getProgramAccounts} config builder,
51
+ * to fetch accounts matching filters that can be specified via that builder.
52
+ *
53
+ * @param programId - the program that owns the accounts we are filtering
54
+ */
55
+ static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
56
+ frozen: any;
57
+ bump: any;
58
+ accountDiscriminator: any;
59
+ vaults: any;
60
+ }>;
61
+ /**
62
+ * Deserializes the {@link Config} from the provided data Buffer.
63
+ * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
64
+ */
65
+ static deserialize(buf: Buffer, offset?: number): [Config, number];
66
+ /**
67
+ * Serializes the {@link Config} into a Buffer.
68
+ * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
69
+ */
70
+ serialize(): [Buffer, number];
71
+ /**
72
+ * Returns the byteSize of a {@link Buffer} holding the serialized data of
73
+ * {@link Config}
74
+ */
75
+ static get byteSize(): number;
76
+ /**
77
+ * Fetches the minimum balance needed to exempt an account holding
78
+ * {@link Config} data from rent
79
+ *
80
+ * @param connection used to retrieve the rent exemption information
81
+ */
82
+ static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
83
+ /**
84
+ * Determines if the provided {@link Buffer} has the correct byte size to
85
+ * hold {@link Config} data.
86
+ */
87
+ static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
88
+ /**
89
+ * Returns a readable version of {@link Config} properties
90
+ * and can be used to convert to JSON and/or logging
91
+ */
92
+ pretty(): {
93
+ bump: number;
94
+ vaults: number | {
95
+ toNumber: () => number;
96
+ };
97
+ frozen: boolean;
98
+ };
99
+ }
100
+ /**
101
+ * @category Accounts
102
+ * @category generated
103
+ */
104
+ export declare const configBeet: beet.BeetStruct<Config, ConfigArgs & {
105
+ accountDiscriminator: number[];
106
+ }>;
@@ -0,0 +1,114 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ import * as beet from '@metaplex-foundation/beet';
8
+ import * as web3 from '@solana/web3.js';
9
+ import * as beetSolana from '@metaplex-foundation/beet-solana';
10
+ /**
11
+ * Arguments used to create {@link Vault}
12
+ * @category Accounts
13
+ * @category generated
14
+ */
15
+ export type VaultArgs = {
16
+ bump: number;
17
+ index: beet.bignum;
18
+ creator: web3.PublicKey;
19
+ depositTokenMint: web3.PublicKey;
20
+ receiptTokenMint: web3.PublicKey;
21
+ };
22
+ export declare const vaultDiscriminator: number[];
23
+ /**
24
+ * Holds the data for the {@link Vault} Account and provides de/serialization
25
+ * functionality for that data
26
+ *
27
+ * @category Accounts
28
+ * @category generated
29
+ */
30
+ export declare class Vault implements VaultArgs {
31
+ readonly bump: number;
32
+ readonly index: beet.bignum;
33
+ readonly creator: web3.PublicKey;
34
+ readonly depositTokenMint: web3.PublicKey;
35
+ readonly receiptTokenMint: web3.PublicKey;
36
+ private constructor();
37
+ /**
38
+ * Creates a {@link Vault} instance from the provided args.
39
+ */
40
+ static fromArgs(args: VaultArgs): Vault;
41
+ /**
42
+ * Deserializes the {@link Vault} from the data of the provided {@link web3.AccountInfo}.
43
+ * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
44
+ */
45
+ static fromAccountInfo(accountInfo: web3.AccountInfo<Buffer>, offset?: number): [Vault, number];
46
+ /**
47
+ * Retrieves the account info from the provided address and deserializes
48
+ * the {@link Vault} from its data.
49
+ *
50
+ * @throws Error if no account info is found at the address or if deserialization fails
51
+ */
52
+ static fromAccountAddress(connection: web3.Connection, address: web3.PublicKey, commitmentOrConfig?: web3.Commitment | web3.GetAccountInfoConfig): Promise<Vault>;
53
+ /**
54
+ * Provides a {@link web3.Connection.getProgramAccounts} config builder,
55
+ * to fetch accounts matching filters that can be specified via that builder.
56
+ *
57
+ * @param programId - the program that owns the accounts we are filtering
58
+ */
59
+ static gpaBuilder(programId?: web3.PublicKey): beetSolana.GpaBuilder<{
60
+ index: any;
61
+ bump: any;
62
+ accountDiscriminator: any;
63
+ creator: any;
64
+ depositTokenMint: any;
65
+ receiptTokenMint: any;
66
+ }>;
67
+ /**
68
+ * Deserializes the {@link Vault} from the provided data Buffer.
69
+ * @returns a tuple of the account data and the offset up to which the buffer was read to obtain it.
70
+ */
71
+ static deserialize(buf: Buffer, offset?: number): [Vault, number];
72
+ /**
73
+ * Serializes the {@link Vault} into a Buffer.
74
+ * @returns a tuple of the created Buffer and the offset up to which the buffer was written to store it.
75
+ */
76
+ serialize(): [Buffer, number];
77
+ /**
78
+ * Returns the byteSize of a {@link Buffer} holding the serialized data of
79
+ * {@link Vault}
80
+ */
81
+ static get byteSize(): number;
82
+ /**
83
+ * Fetches the minimum balance needed to exempt an account holding
84
+ * {@link Vault} data from rent
85
+ *
86
+ * @param connection used to retrieve the rent exemption information
87
+ */
88
+ static getMinimumBalanceForRentExemption(connection: web3.Connection, commitment?: web3.Commitment): Promise<number>;
89
+ /**
90
+ * Determines if the provided {@link Buffer} has the correct byte size to
91
+ * hold {@link Vault} data.
92
+ */
93
+ static hasCorrectByteSize(buf: Buffer, offset?: number): boolean;
94
+ /**
95
+ * Returns a readable version of {@link Vault} properties
96
+ * and can be used to convert to JSON and/or logging
97
+ */
98
+ pretty(): {
99
+ bump: number;
100
+ index: number | {
101
+ toNumber: () => number;
102
+ };
103
+ creator: string;
104
+ depositTokenMint: string;
105
+ receiptTokenMint: string;
106
+ };
107
+ }
108
+ /**
109
+ * @category Accounts
110
+ * @category generated
111
+ */
112
+ export declare const vaultBeet: beet.BeetStruct<Vault, VaultArgs & {
113
+ accountDiscriminator: number[];
114
+ }>;
@@ -0,0 +1,11 @@
1
+ export * from './Admin';
2
+ export * from './Config';
3
+ export * from './Vault';
4
+ import { Admin } from './Admin';
5
+ import { Config } from './Config';
6
+ import { Vault } from './Vault';
7
+ export declare const accountProviders: {
8
+ Admin: typeof Admin;
9
+ Config: typeof Config;
10
+ Vault: typeof Vault;
11
+ };
@@ -0,0 +1,144 @@
1
+ /**
2
+ * This code was GENERATED using the solita package.
3
+ * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
+ *
5
+ * See: https://github.com/metaplex-foundation/solita
6
+ */
7
+ type ErrorWithCode = Error & {
8
+ code: number;
9
+ };
10
+ type MaybeErrorWithCode = ErrorWithCode | null | undefined;
11
+ /**
12
+ * InvalidSigner: 'Invalid transaction signer.'
13
+ *
14
+ * @category Errors
15
+ * @category generated
16
+ */
17
+ export declare class InvalidSignerError extends Error {
18
+ readonly code: number;
19
+ readonly name: string;
20
+ constructor();
21
+ }
22
+ /**
23
+ * ProgramAccountsMismatch: 'ProgramAccountsMismatch'
24
+ *
25
+ * @category Errors
26
+ * @category generated
27
+ */
28
+ export declare class ProgramAccountsMismatchError extends Error {
29
+ readonly code: number;
30
+ readonly name: string;
31
+ constructor();
32
+ }
33
+ /**
34
+ * InvalidReceiptTokenSupply: 'InvalidReceiptTokenSupply'
35
+ *
36
+ * @category Errors
37
+ * @category generated
38
+ */
39
+ export declare class InvalidReceiptTokenSupplyError extends Error {
40
+ readonly code: number;
41
+ readonly name: string;
42
+ constructor();
43
+ }
44
+ /**
45
+ * InvalidReceiptTokenMintAuthority: 'InvalidReceiptTokenMintAuthority'
46
+ *
47
+ * @category Errors
48
+ * @category generated
49
+ */
50
+ export declare class InvalidReceiptTokenMintAuthorityError extends Error {
51
+ readonly code: number;
52
+ readonly name: string;
53
+ constructor();
54
+ }
55
+ /**
56
+ * InvalidReceiptTokenFreezeAuthority: 'InvalidReceiptTokenFreezeAuthority'
57
+ *
58
+ * @category Errors
59
+ * @category generated
60
+ */
61
+ export declare class InvalidReceiptTokenFreezeAuthorityError extends Error {
62
+ readonly code: number;
63
+ readonly name: string;
64
+ constructor();
65
+ }
66
+ /**
67
+ * InvalidReceiptTokenSetup: 'InvalidReceiptTokenSetup'
68
+ *
69
+ * @category Errors
70
+ * @category generated
71
+ */
72
+ export declare class InvalidReceiptTokenSetupError extends Error {
73
+ readonly code: number;
74
+ readonly name: string;
75
+ constructor();
76
+ }
77
+ /**
78
+ * InvalidReceiptTokenDecimals: 'InvalidReceiptTokenDecimals'
79
+ *
80
+ * @category Errors
81
+ * @category generated
82
+ */
83
+ export declare class InvalidReceiptTokenDecimalsError extends Error {
84
+ readonly code: number;
85
+ readonly name: string;
86
+ constructor();
87
+ }
88
+ /**
89
+ * ZeroDivision: 'ZeroDivision'
90
+ *
91
+ * @category Errors
92
+ * @category generated
93
+ */
94
+ export declare class ZeroDivisionError extends Error {
95
+ readonly code: number;
96
+ readonly name: string;
97
+ constructor();
98
+ }
99
+ /**
100
+ * MathOverflow: 'MathOverflow'
101
+ *
102
+ * @category Errors
103
+ * @category generated
104
+ */
105
+ export declare class MathOverflowError extends Error {
106
+ readonly code: number;
107
+ readonly name: string;
108
+ constructor();
109
+ }
110
+ /**
111
+ * MissingAccounts: 'MissingAccounts'
112
+ *
113
+ * @category Errors
114
+ * @category generated
115
+ */
116
+ export declare class MissingAccountsError extends Error {
117
+ readonly code: number;
118
+ readonly name: string;
119
+ constructor();
120
+ }
121
+ /**
122
+ * AmountTooLow: 'AmountTooLow'
123
+ *
124
+ * @category Errors
125
+ * @category generated
126
+ */
127
+ export declare class AmountTooLowError extends Error {
128
+ readonly code: number;
129
+ readonly name: string;
130
+ constructor();
131
+ }
132
+ /**
133
+ * Attempts to resolve a custom program error from the provided error code.
134
+ * @category Errors
135
+ * @category generated
136
+ */
137
+ export declare function errorFromCode(code: number): MaybeErrorWithCode;
138
+ /**
139
+ * Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.
140
+ * @category Errors
141
+ * @category generated
142
+ */
143
+ export declare function errorFromName(name: string): MaybeErrorWithCode;
144
+ export {};
@@ -0,0 +1,19 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ export * from './accounts';
3
+ export * from './errors';
4
+ export * from './instructions';
5
+ export * from './types';
6
+ /**
7
+ * Program address
8
+ *
9
+ * @category constants
10
+ * @category generated
11
+ */
12
+ export declare const PROGRAM_ADDRESS = "3y4JooLs5Y2QQY5gqt49WPoeBirThj7GgQYamia5HxZd";
13
+ /**
14
+ * Program public key
15
+ *
16
+ * @category constants
17
+ * @category generated
18
+ */
19
+ export declare const PROGRAM_ID: PublicKey;