@acta-markets/ts-sdk 0.0.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +308 -0
- package/dist/actaClient.d.ts +46 -0
- package/dist/actaClient.js +99 -0
- package/dist/chain/client.d.ts +65 -0
- package/dist/chain/client.js +82 -0
- package/dist/chain/fetch.d.ts +204 -0
- package/dist/chain/fetch.js +392 -0
- package/dist/chain/fetch.test.d.ts +1 -0
- package/dist/chain/fetch.test.js +158 -0
- package/dist/chain/flows/index.d.ts +1 -0
- package/dist/chain/flows/index.js +1 -0
- package/dist/chain/flows/openPosition.d.ts +48 -0
- package/dist/chain/flows/openPosition.js +78 -0
- package/dist/chain/flows/openPosition.test.d.ts +1 -0
- package/dist/chain/flows/openPosition.test.js +43 -0
- package/dist/chain/helpers.d.ts +16 -0
- package/dist/chain/helpers.js +60 -0
- package/dist/chain/index.d.ts +9 -0
- package/dist/chain/index.js +9 -0
- package/dist/chain/instructions.admin.d.ts +44 -0
- package/dist/chain/instructions.admin.js +113 -0
- package/dist/chain/instructions.d.ts +5 -0
- package/dist/chain/instructions.js +5 -0
- package/dist/chain/instructions.maker.d.ts +34 -0
- package/dist/chain/instructions.maker.js +86 -0
- package/dist/chain/instructions.market.d.ts +39 -0
- package/dist/chain/instructions.market.js +107 -0
- package/dist/chain/instructions.oracle.d.ts +38 -0
- package/dist/chain/instructions.oracle.js +63 -0
- package/dist/chain/instructions.position.d.ts +82 -0
- package/dist/chain/instructions.position.js +240 -0
- package/dist/chain/instructions.resolve.test.d.ts +1 -0
- package/dist/chain/instructions.resolve.test.js +32 -0
- package/dist/chain/instructions.shared.d.ts +23 -0
- package/dist/chain/instructions.shared.js +55 -0
- package/dist/chain/orders.d.ts +40 -0
- package/dist/chain/orders.js +117 -0
- package/dist/chain/orders.test.d.ts +1 -0
- package/dist/chain/orders.test.js +67 -0
- package/dist/chain/signers.d.ts +9 -0
- package/dist/chain/signers.js +19 -0
- package/dist/chain/signers.test.d.ts +1 -0
- package/dist/chain/signers.test.js +13 -0
- package/dist/chain/token.d.ts +59 -0
- package/dist/chain/token.js +136 -0
- package/dist/chain/token.test.d.ts +1 -0
- package/dist/chain/token.test.js +69 -0
- package/dist/chain/tx.d.ts +72 -0
- package/dist/chain/tx.js +97 -0
- package/dist/cjs/actaClient.js +103 -0
- package/dist/cjs/chain/client.js +119 -0
- package/dist/cjs/chain/fetch.js +431 -0
- package/dist/cjs/chain/fetch.test.js +160 -0
- package/dist/cjs/chain/flows/index.js +17 -0
- package/dist/cjs/chain/flows/openPosition.js +81 -0
- package/dist/cjs/chain/flows/openPosition.test.js +45 -0
- package/dist/cjs/chain/helpers.js +67 -0
- package/dist/cjs/chain/index.js +48 -0
- package/dist/cjs/chain/instructions.admin.js +119 -0
- package/dist/cjs/chain/instructions.js +21 -0
- package/dist/cjs/chain/instructions.maker.js +92 -0
- package/dist/cjs/chain/instructions.market.js +112 -0
- package/dist/cjs/chain/instructions.oracle.js +70 -0
- package/dist/cjs/chain/instructions.position.js +247 -0
- package/dist/cjs/chain/instructions.resolve.test.js +34 -0
- package/dist/cjs/chain/instructions.shared.js +64 -0
- package/dist/cjs/chain/orders.js +126 -0
- package/dist/cjs/chain/orders.test.js +69 -0
- package/dist/cjs/chain/signers.js +22 -0
- package/dist/cjs/chain/signers.test.js +15 -0
- package/dist/cjs/chain/token.js +147 -0
- package/dist/cjs/chain/token.test.js +71 -0
- package/dist/cjs/chain/tx.js +103 -0
- package/dist/cjs/constants.js +6 -0
- package/dist/cjs/constants.test.js +31 -0
- package/dist/cjs/events.js +75 -0
- package/dist/cjs/events.test.js +384 -0
- package/dist/cjs/generated/accounts/config.js +79 -0
- package/dist/cjs/generated/accounts/index.js +28 -0
- package/dist/cjs/generated/accounts/maker.js +71 -0
- package/dist/cjs/generated/accounts/market.js +93 -0
- package/dist/cjs/generated/accounts/oracle.js +85 -0
- package/dist/cjs/generated/accounts/position.js +89 -0
- package/dist/cjs/generated/errors/actaContract.js +154 -0
- package/dist/cjs/generated/errors/index.js +24 -0
- package/dist/cjs/generated/index.js +28 -0
- package/dist/cjs/generated/instructions/changeOracleSource.js +81 -0
- package/dist/cjs/generated/instructions/closeMarket.js +83 -0
- package/dist/cjs/generated/instructions/closeOracle.js +79 -0
- package/dist/cjs/generated/instructions/createMarket.js +116 -0
- package/dist/cjs/generated/instructions/createOracle.js +99 -0
- package/dist/cjs/generated/instructions/depositFundsToPosition.js +101 -0
- package/dist/cjs/generated/instructions/depositPremium.js +96 -0
- package/dist/cjs/generated/instructions/finalizeMarket.js +91 -0
- package/dist/cjs/generated/instructions/index.js +43 -0
- package/dist/cjs/generated/instructions/initializeConfig.js +108 -0
- package/dist/cjs/generated/instructions/liquidatePosition.js +107 -0
- package/dist/cjs/generated/instructions/openPosition.js +154 -0
- package/dist/cjs/generated/instructions/registerMaker.js +90 -0
- package/dist/cjs/generated/instructions/setOracleConfig.js +80 -0
- package/dist/cjs/generated/instructions/settlePosition.js +104 -0
- package/dist/cjs/generated/instructions/topupFeeFund.js +96 -0
- package/dist/cjs/generated/instructions/updateConfig.js +86 -0
- package/dist/cjs/generated/instructions/updateMakerQuoteSigning.js +79 -0
- package/dist/cjs/generated/instructions/updateMarketOracles.js +96 -0
- package/dist/cjs/generated/instructions/updateOraclePrice.js +89 -0
- package/dist/cjs/generated/instructions/withdrawFromFeeFund.js +96 -0
- package/dist/cjs/generated/instructions/withdrawPremium.js +96 -0
- package/dist/cjs/generated/programs/actaContract.js +108 -0
- package/dist/cjs/generated/programs/index.js +24 -0
- package/dist/cjs/generated/shared/index.js +94 -0
- package/dist/cjs/generated/types/actaEvent.js +342 -0
- package/dist/cjs/generated/types/eventKind.js +45 -0
- package/dist/cjs/generated/types/index.js +27 -0
- package/dist/cjs/generated/types/positionStatus.js +31 -0
- package/dist/cjs/generated/types/positionType.js +28 -0
- package/dist/cjs/idl/acta_contract.json +2329 -0
- package/dist/cjs/idl/hash.js +4 -0
- package/dist/cjs/index.js +84 -0
- package/dist/cjs/nonce.js +93 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/types/index.js +18 -0
- package/dist/cjs/types/orderId.js +40 -0
- package/dist/cjs/types/orders.js +10 -0
- package/dist/cjs/ws/apy.js +106 -0
- package/dist/cjs/ws/apy.test.js +29 -0
- package/dist/cjs/ws/auth.js +104 -0
- package/dist/cjs/ws/client.handshake.integration.test.js +69 -0
- package/dist/cjs/ws/client.js +861 -0
- package/dist/cjs/ws/client.test.js +230 -0
- package/dist/cjs/ws/discovery.js +48 -0
- package/dist/cjs/ws/flows.js +101 -0
- package/dist/cjs/ws/flows.test.js +85 -0
- package/dist/cjs/ws/index.js +23 -0
- package/dist/cjs/ws/sponsoredTx.js +95 -0
- package/dist/cjs/ws/types.js +14 -0
- package/dist/cjs/ws/wirePolicy.js +34 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +3 -0
- package/dist/constants.test.d.ts +1 -0
- package/dist/constants.test.js +29 -0
- package/dist/events.d.ts +15 -0
- package/dist/events.js +64 -0
- package/dist/events.test.d.ts +1 -0
- package/dist/events.test.js +382 -0
- package/dist/generated/accounts/config.d.ts +47 -0
- package/dist/generated/accounts/config.js +68 -0
- package/dist/generated/accounts/index.d.ts +12 -0
- package/dist/generated/accounts/index.js +12 -0
- package/dist/generated/accounts/maker.d.ts +39 -0
- package/dist/generated/accounts/maker.js +60 -0
- package/dist/generated/accounts/market.d.ts +61 -0
- package/dist/generated/accounts/market.js +82 -0
- package/dist/generated/accounts/oracle.d.ts +53 -0
- package/dist/generated/accounts/oracle.js +74 -0
- package/dist/generated/accounts/position.d.ts +57 -0
- package/dist/generated/accounts/position.js +78 -0
- package/dist/generated/errors/actaContract.d.ts +103 -0
- package/dist/generated/errors/actaContract.js +149 -0
- package/dist/generated/errors/index.d.ts +8 -0
- package/dist/generated/errors/index.js +8 -0
- package/dist/generated/index.d.ts +12 -0
- package/dist/generated/index.js +12 -0
- package/dist/generated/instructions/changeOracleSource.d.ts +50 -0
- package/dist/generated/instructions/changeOracleSource.js +72 -0
- package/dist/generated/instructions/closeMarket.d.ts +58 -0
- package/dist/generated/instructions/closeMarket.js +74 -0
- package/dist/generated/instructions/closeOracle.d.ts +48 -0
- package/dist/generated/instructions/closeOracle.js +70 -0
- package/dist/generated/instructions/createMarket.d.ts +90 -0
- package/dist/generated/instructions/createMarket.js +107 -0
- package/dist/generated/instructions/createOracle.d.ts +71 -0
- package/dist/generated/instructions/createOracle.js +90 -0
- package/dist/generated/instructions/depositFundsToPosition.d.ts +73 -0
- package/dist/generated/instructions/depositFundsToPosition.js +92 -0
- package/dist/generated/instructions/depositPremium.d.ts +62 -0
- package/dist/generated/instructions/depositPremium.js +87 -0
- package/dist/generated/instructions/finalizeMarket.d.ts +63 -0
- package/dist/generated/instructions/finalizeMarket.js +82 -0
- package/dist/generated/instructions/index.d.ts +27 -0
- package/dist/generated/instructions/index.js +27 -0
- package/dist/generated/instructions/initializeConfig.d.ts +75 -0
- package/dist/generated/instructions/initializeConfig.js +99 -0
- package/dist/generated/instructions/liquidatePosition.d.ts +78 -0
- package/dist/generated/instructions/liquidatePosition.js +98 -0
- package/dist/generated/instructions/openPosition.d.ts +130 -0
- package/dist/generated/instructions/openPosition.js +145 -0
- package/dist/generated/instructions/registerMaker.d.ts +57 -0
- package/dist/generated/instructions/registerMaker.js +81 -0
- package/dist/generated/instructions/setOracleConfig.d.ts +53 -0
- package/dist/generated/instructions/setOracleConfig.js +71 -0
- package/dist/generated/instructions/settlePosition.d.ts +78 -0
- package/dist/generated/instructions/settlePosition.js +95 -0
- package/dist/generated/instructions/topupFeeFund.d.ts +67 -0
- package/dist/generated/instructions/topupFeeFund.js +87 -0
- package/dist/generated/instructions/updateConfig.d.ts +58 -0
- package/dist/generated/instructions/updateConfig.js +77 -0
- package/dist/generated/instructions/updateMakerQuoteSigning.d.ts +47 -0
- package/dist/generated/instructions/updateMakerQuoteSigning.js +70 -0
- package/dist/generated/instructions/updateMarketOracles.d.ts +65 -0
- package/dist/generated/instructions/updateMarketOracles.js +87 -0
- package/dist/generated/instructions/updateOraclePrice.d.ts +55 -0
- package/dist/generated/instructions/updateOraclePrice.js +80 -0
- package/dist/generated/instructions/withdrawFromFeeFund.d.ts +62 -0
- package/dist/generated/instructions/withdrawFromFeeFund.js +87 -0
- package/dist/generated/instructions/withdrawPremium.d.ts +62 -0
- package/dist/generated/instructions/withdrawPremium.js +87 -0
- package/dist/generated/programs/actaContract.d.ts +83 -0
- package/dist/generated/programs/actaContract.js +104 -0
- package/dist/generated/programs/index.d.ts +8 -0
- package/dist/generated/programs/index.js +8 -0
- package/dist/generated/shared/index.d.ts +49 -0
- package/dist/generated/shared/index.js +86 -0
- package/dist/generated/types/actaEvent.d.ts +249 -0
- package/dist/generated/types/actaEvent.js +335 -0
- package/dist/generated/types/eventKind.d.ts +33 -0
- package/dist/generated/types/eventKind.js +39 -0
- package/dist/generated/types/index.d.ts +11 -0
- package/dist/generated/types/index.js +11 -0
- package/dist/generated/types/positionStatus.d.ts +19 -0
- package/dist/generated/types/positionStatus.js +25 -0
- package/dist/generated/types/positionType.d.ts +16 -0
- package/dist/generated/types/positionType.js +22 -0
- package/dist/idl/acta_contract.json +2329 -0
- package/dist/idl/hash.d.ts +1 -0
- package/dist/idl/hash.js +1 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.js +34 -0
- package/dist/nonce.d.ts +29 -0
- package/dist/nonce.js +89 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/orderId.d.ts +13 -0
- package/dist/types/orderId.js +35 -0
- package/dist/types/orders.d.ts +9 -0
- package/dist/types/orders.js +9 -0
- package/dist/ws/apy.d.ts +79 -0
- package/dist/ws/apy.js +98 -0
- package/dist/ws/apy.test.d.ts +1 -0
- package/dist/ws/apy.test.js +27 -0
- package/dist/ws/auth.d.ts +67 -0
- package/dist/ws/auth.js +98 -0
- package/dist/ws/client.d.ts +263 -0
- package/dist/ws/client.handshake.integration.test.d.ts +1 -0
- package/dist/ws/client.handshake.integration.test.js +64 -0
- package/dist/ws/client.js +857 -0
- package/dist/ws/client.test.d.ts +1 -0
- package/dist/ws/client.test.js +228 -0
- package/dist/ws/discovery.d.ts +13 -0
- package/dist/ws/discovery.js +44 -0
- package/dist/ws/flows.d.ts +44 -0
- package/dist/ws/flows.js +96 -0
- package/dist/ws/flows.test.d.ts +1 -0
- package/dist/ws/flows.test.js +83 -0
- package/dist/ws/index.d.ts +7 -0
- package/dist/ws/index.js +7 -0
- package/dist/ws/sponsoredTx.d.ts +39 -0
- package/dist/ws/sponsoredTx.js +92 -0
- package/dist/ws/types.d.ts +900 -0
- package/dist/ws/types.js +13 -0
- package/dist/ws/wirePolicy.d.ts +12 -0
- package/dist/ws/wirePolicy.js +30 -0
- package/package.json +87 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type ProgramDerivedAddress, type TransactionSigner } from "@solana/kit";
|
|
9
|
+
/**
|
|
10
|
+
* Asserts that the given value is not null or undefined.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function expectSome<T>(value: T | null | undefined): T;
|
|
14
|
+
/**
|
|
15
|
+
* Asserts that the given value is a PublicKey.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function expectAddress<T extends string = string>(value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined): Address<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Asserts that the given value is a PDA.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function expectProgramDerivedAddress<T extends string = string>(value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined): ProgramDerivedAddress<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Asserts that the given value is a TransactionSigner.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function expectTransactionSigner<T extends string = string>(value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined): TransactionSigner<T>;
|
|
29
|
+
/**
|
|
30
|
+
* Defines an instruction account to resolve.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export type ResolvedAccount<T extends string = string, U extends Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null = Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null> = {
|
|
34
|
+
isWritable: boolean;
|
|
35
|
+
value: U;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Defines an instruction that stores additional bytes on-chain.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export type InstructionWithByteDelta = {
|
|
42
|
+
byteDelta: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Get account metas and signers from resolved accounts.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: "omitted" | "programId"): (account: ResolvedAccount) => AccountMeta | AccountSignerMeta | undefined;
|
|
49
|
+
export declare function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { AccountRole, isProgramDerivedAddress, isTransactionSigner as kitIsTransactionSigner, upgradeRoleToSigner, } from "@solana/kit";
|
|
9
|
+
/**
|
|
10
|
+
* Asserts that the given value is not null or undefined.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export function expectSome(value) {
|
|
14
|
+
if (value === null || value === undefined) {
|
|
15
|
+
throw new Error("Expected a value but received null or undefined.");
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Asserts that the given value is a PublicKey.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export function expectAddress(value) {
|
|
24
|
+
if (!value) {
|
|
25
|
+
throw new Error("Expected a Address.");
|
|
26
|
+
}
|
|
27
|
+
if (typeof value === "object" && "address" in value) {
|
|
28
|
+
return value.address;
|
|
29
|
+
}
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
return value[0];
|
|
32
|
+
}
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Asserts that the given value is a PDA.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export function expectProgramDerivedAddress(value) {
|
|
40
|
+
if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {
|
|
41
|
+
throw new Error("Expected a ProgramDerivedAddress.");
|
|
42
|
+
}
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Asserts that the given value is a TransactionSigner.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export function expectTransactionSigner(value) {
|
|
50
|
+
if (!value || !isTransactionSigner(value)) {
|
|
51
|
+
throw new Error("Expected a TransactionSigner.");
|
|
52
|
+
}
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get account metas and signers from resolved accounts.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
60
|
+
return (account) => {
|
|
61
|
+
if (!account.value) {
|
|
62
|
+
if (optionalAccountStrategy === "omitted")
|
|
63
|
+
return;
|
|
64
|
+
return Object.freeze({
|
|
65
|
+
address: programAddress,
|
|
66
|
+
role: AccountRole.READONLY,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const writableRole = account.isWritable
|
|
70
|
+
? AccountRole.WRITABLE
|
|
71
|
+
: AccountRole.READONLY;
|
|
72
|
+
return Object.freeze({
|
|
73
|
+
address: expectAddress(account.value),
|
|
74
|
+
role: isTransactionSigner(account.value)
|
|
75
|
+
? upgradeRoleToSigner(writableRole)
|
|
76
|
+
: writableRole,
|
|
77
|
+
...(isTransactionSigner(account.value) ? { signer: account.value } : {}),
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export function isTransactionSigner(value) {
|
|
82
|
+
return (!!value &&
|
|
83
|
+
typeof value === "object" &&
|
|
84
|
+
"address" in value &&
|
|
85
|
+
kitIsTransactionSigner(value));
|
|
86
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type Address, type Codec, type Decoder, type Encoder, type GetDiscriminatedUnionVariant, type GetDiscriminatedUnionVariantContent, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export type ActaEvent = {
|
|
10
|
+
__kind: "InitializeConfig";
|
|
11
|
+
configPda: Address;
|
|
12
|
+
premiumMint: Address;
|
|
13
|
+
protocolFeeBpsPremium: number;
|
|
14
|
+
protocolFeeBpsVolume: number;
|
|
15
|
+
} | {
|
|
16
|
+
__kind: "UpdateConfig";
|
|
17
|
+
configPda: Address;
|
|
18
|
+
mask: number;
|
|
19
|
+
protocolFeeBpsPremium: number;
|
|
20
|
+
protocolFeeBpsVolume: number;
|
|
21
|
+
} | {
|
|
22
|
+
__kind: "RegisterMaker";
|
|
23
|
+
makerOwner: Address;
|
|
24
|
+
quoteSigning: Address;
|
|
25
|
+
} | {
|
|
26
|
+
__kind: "UpdateMakerQuoteSigning";
|
|
27
|
+
makerOwner: Address;
|
|
28
|
+
newQuoteSigning: Address;
|
|
29
|
+
} | {
|
|
30
|
+
__kind: "DepositPremium";
|
|
31
|
+
makerOwner: Address;
|
|
32
|
+
makerPda: Address;
|
|
33
|
+
mint: Address;
|
|
34
|
+
amount: bigint;
|
|
35
|
+
} | {
|
|
36
|
+
__kind: "WithdrawPremium";
|
|
37
|
+
makerOwner: Address;
|
|
38
|
+
makerPda: Address;
|
|
39
|
+
mint: Address;
|
|
40
|
+
amount: bigint;
|
|
41
|
+
} | {
|
|
42
|
+
__kind: "WithdrawFromFeeFund";
|
|
43
|
+
configPda: Address;
|
|
44
|
+
mint: Address;
|
|
45
|
+
amount: bigint;
|
|
46
|
+
} | {
|
|
47
|
+
__kind: "TopupFeeFund";
|
|
48
|
+
configPda: Address;
|
|
49
|
+
mint: Address;
|
|
50
|
+
amount: bigint;
|
|
51
|
+
} | {
|
|
52
|
+
__kind: "CreateMarket";
|
|
53
|
+
marketPda: Address;
|
|
54
|
+
underlyingMint: Address;
|
|
55
|
+
quoteMint: Address;
|
|
56
|
+
expiryTs: bigint;
|
|
57
|
+
isPut: number;
|
|
58
|
+
} | {
|
|
59
|
+
__kind: "FinalizeMarket";
|
|
60
|
+
marketPda: Address;
|
|
61
|
+
settlementPrice: bigint;
|
|
62
|
+
} | {
|
|
63
|
+
__kind: "CloseMarket";
|
|
64
|
+
marketPda: Address;
|
|
65
|
+
} | {
|
|
66
|
+
__kind: "OpenPosition";
|
|
67
|
+
user: Address;
|
|
68
|
+
makerPda: Address;
|
|
69
|
+
marketPda: Address;
|
|
70
|
+
positionPda: Address;
|
|
71
|
+
positionType: number;
|
|
72
|
+
strike: bigint;
|
|
73
|
+
quantity: bigint;
|
|
74
|
+
price: bigint;
|
|
75
|
+
validUntil: bigint;
|
|
76
|
+
orderId: ReadonlyUint8Array;
|
|
77
|
+
totalPremium: bigint;
|
|
78
|
+
} | {
|
|
79
|
+
__kind: "DepositFundsToPosition";
|
|
80
|
+
makerPda: Address;
|
|
81
|
+
marketPda: Address;
|
|
82
|
+
positionPda: Address;
|
|
83
|
+
amount: bigint;
|
|
84
|
+
} | {
|
|
85
|
+
__kind: "SettlePosition";
|
|
86
|
+
settler: Address;
|
|
87
|
+
makerOwner: Address;
|
|
88
|
+
positionPda: Address;
|
|
89
|
+
marketPda: Address;
|
|
90
|
+
finalStatus: number;
|
|
91
|
+
} | {
|
|
92
|
+
__kind: "CreateOracle";
|
|
93
|
+
oraclePda: Address;
|
|
94
|
+
mint: Address;
|
|
95
|
+
expiryTs: bigint;
|
|
96
|
+
oracleType: number;
|
|
97
|
+
authority: Address;
|
|
98
|
+
} | {
|
|
99
|
+
__kind: "UpdateOraclePrice";
|
|
100
|
+
oraclePda: Address;
|
|
101
|
+
price: bigint;
|
|
102
|
+
settledExpiryTs: bigint;
|
|
103
|
+
} | {
|
|
104
|
+
__kind: "SetOracleConfig";
|
|
105
|
+
oraclePda: Address;
|
|
106
|
+
isActive: number;
|
|
107
|
+
authority: Address;
|
|
108
|
+
} | {
|
|
109
|
+
__kind: "ChangeOracleSource";
|
|
110
|
+
oraclePda: Address;
|
|
111
|
+
oracleType: number;
|
|
112
|
+
feedId: ReadonlyUint8Array;
|
|
113
|
+
} | {
|
|
114
|
+
__kind: "CloseOracle";
|
|
115
|
+
oraclePda: Address;
|
|
116
|
+
};
|
|
117
|
+
export type ActaEventArgs = {
|
|
118
|
+
__kind: "InitializeConfig";
|
|
119
|
+
configPda: Address;
|
|
120
|
+
premiumMint: Address;
|
|
121
|
+
protocolFeeBpsPremium: number;
|
|
122
|
+
protocolFeeBpsVolume: number;
|
|
123
|
+
} | {
|
|
124
|
+
__kind: "UpdateConfig";
|
|
125
|
+
configPda: Address;
|
|
126
|
+
mask: number;
|
|
127
|
+
protocolFeeBpsPremium: number;
|
|
128
|
+
protocolFeeBpsVolume: number;
|
|
129
|
+
} | {
|
|
130
|
+
__kind: "RegisterMaker";
|
|
131
|
+
makerOwner: Address;
|
|
132
|
+
quoteSigning: Address;
|
|
133
|
+
} | {
|
|
134
|
+
__kind: "UpdateMakerQuoteSigning";
|
|
135
|
+
makerOwner: Address;
|
|
136
|
+
newQuoteSigning: Address;
|
|
137
|
+
} | {
|
|
138
|
+
__kind: "DepositPremium";
|
|
139
|
+
makerOwner: Address;
|
|
140
|
+
makerPda: Address;
|
|
141
|
+
mint: Address;
|
|
142
|
+
amount: number | bigint;
|
|
143
|
+
} | {
|
|
144
|
+
__kind: "WithdrawPremium";
|
|
145
|
+
makerOwner: Address;
|
|
146
|
+
makerPda: Address;
|
|
147
|
+
mint: Address;
|
|
148
|
+
amount: number | bigint;
|
|
149
|
+
} | {
|
|
150
|
+
__kind: "WithdrawFromFeeFund";
|
|
151
|
+
configPda: Address;
|
|
152
|
+
mint: Address;
|
|
153
|
+
amount: number | bigint;
|
|
154
|
+
} | {
|
|
155
|
+
__kind: "TopupFeeFund";
|
|
156
|
+
configPda: Address;
|
|
157
|
+
mint: Address;
|
|
158
|
+
amount: number | bigint;
|
|
159
|
+
} | {
|
|
160
|
+
__kind: "CreateMarket";
|
|
161
|
+
marketPda: Address;
|
|
162
|
+
underlyingMint: Address;
|
|
163
|
+
quoteMint: Address;
|
|
164
|
+
expiryTs: number | bigint;
|
|
165
|
+
isPut: number;
|
|
166
|
+
} | {
|
|
167
|
+
__kind: "FinalizeMarket";
|
|
168
|
+
marketPda: Address;
|
|
169
|
+
settlementPrice: number | bigint;
|
|
170
|
+
} | {
|
|
171
|
+
__kind: "CloseMarket";
|
|
172
|
+
marketPda: Address;
|
|
173
|
+
} | {
|
|
174
|
+
__kind: "OpenPosition";
|
|
175
|
+
user: Address;
|
|
176
|
+
makerPda: Address;
|
|
177
|
+
marketPda: Address;
|
|
178
|
+
positionPda: Address;
|
|
179
|
+
positionType: number;
|
|
180
|
+
strike: number | bigint;
|
|
181
|
+
quantity: number | bigint;
|
|
182
|
+
price: number | bigint;
|
|
183
|
+
validUntil: number | bigint;
|
|
184
|
+
orderId: ReadonlyUint8Array;
|
|
185
|
+
totalPremium: number | bigint;
|
|
186
|
+
} | {
|
|
187
|
+
__kind: "DepositFundsToPosition";
|
|
188
|
+
makerPda: Address;
|
|
189
|
+
marketPda: Address;
|
|
190
|
+
positionPda: Address;
|
|
191
|
+
amount: number | bigint;
|
|
192
|
+
} | {
|
|
193
|
+
__kind: "SettlePosition";
|
|
194
|
+
settler: Address;
|
|
195
|
+
makerOwner: Address;
|
|
196
|
+
positionPda: Address;
|
|
197
|
+
marketPda: Address;
|
|
198
|
+
finalStatus: number;
|
|
199
|
+
} | {
|
|
200
|
+
__kind: "CreateOracle";
|
|
201
|
+
oraclePda: Address;
|
|
202
|
+
mint: Address;
|
|
203
|
+
expiryTs: number | bigint;
|
|
204
|
+
oracleType: number;
|
|
205
|
+
authority: Address;
|
|
206
|
+
} | {
|
|
207
|
+
__kind: "UpdateOraclePrice";
|
|
208
|
+
oraclePda: Address;
|
|
209
|
+
price: number | bigint;
|
|
210
|
+
settledExpiryTs: number | bigint;
|
|
211
|
+
} | {
|
|
212
|
+
__kind: "SetOracleConfig";
|
|
213
|
+
oraclePda: Address;
|
|
214
|
+
isActive: number;
|
|
215
|
+
authority: Address;
|
|
216
|
+
} | {
|
|
217
|
+
__kind: "ChangeOracleSource";
|
|
218
|
+
oraclePda: Address;
|
|
219
|
+
oracleType: number;
|
|
220
|
+
feedId: ReadonlyUint8Array;
|
|
221
|
+
} | {
|
|
222
|
+
__kind: "CloseOracle";
|
|
223
|
+
oraclePda: Address;
|
|
224
|
+
};
|
|
225
|
+
export declare function getActaEventEncoder(): Encoder<ActaEventArgs>;
|
|
226
|
+
export declare function getActaEventDecoder(): Decoder<ActaEvent>;
|
|
227
|
+
export declare function getActaEventCodec(): Codec<ActaEventArgs, ActaEvent>;
|
|
228
|
+
export declare function actaEvent(kind: "InitializeConfig", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "InitializeConfig">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "InitializeConfig">;
|
|
229
|
+
export declare function actaEvent(kind: "UpdateConfig", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "UpdateConfig">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "UpdateConfig">;
|
|
230
|
+
export declare function actaEvent(kind: "RegisterMaker", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "RegisterMaker">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "RegisterMaker">;
|
|
231
|
+
export declare function actaEvent(kind: "UpdateMakerQuoteSigning", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "UpdateMakerQuoteSigning">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "UpdateMakerQuoteSigning">;
|
|
232
|
+
export declare function actaEvent(kind: "DepositPremium", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "DepositPremium">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "DepositPremium">;
|
|
233
|
+
export declare function actaEvent(kind: "WithdrawPremium", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "WithdrawPremium">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "WithdrawPremium">;
|
|
234
|
+
export declare function actaEvent(kind: "WithdrawFromFeeFund", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "WithdrawFromFeeFund">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "WithdrawFromFeeFund">;
|
|
235
|
+
export declare function actaEvent(kind: "TopupFeeFund", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "TopupFeeFund">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "TopupFeeFund">;
|
|
236
|
+
export declare function actaEvent(kind: "CreateMarket", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "CreateMarket">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "CreateMarket">;
|
|
237
|
+
export declare function actaEvent(kind: "FinalizeMarket", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "FinalizeMarket">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "FinalizeMarket">;
|
|
238
|
+
export declare function actaEvent(kind: "CloseMarket", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "CloseMarket">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "CloseMarket">;
|
|
239
|
+
export declare function actaEvent(kind: "OpenPosition", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "OpenPosition">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "OpenPosition">;
|
|
240
|
+
export declare function actaEvent(kind: "DepositFundsToPosition", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "DepositFundsToPosition">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "DepositFundsToPosition">;
|
|
241
|
+
export declare function actaEvent(kind: "SettlePosition", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "SettlePosition">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "SettlePosition">;
|
|
242
|
+
export declare function actaEvent(kind: "CreateOracle", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "CreateOracle">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "CreateOracle">;
|
|
243
|
+
export declare function actaEvent(kind: "UpdateOraclePrice", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "UpdateOraclePrice">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "UpdateOraclePrice">;
|
|
244
|
+
export declare function actaEvent(kind: "SetOracleConfig", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "SetOracleConfig">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "SetOracleConfig">;
|
|
245
|
+
export declare function actaEvent(kind: "ChangeOracleSource", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "ChangeOracleSource">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "ChangeOracleSource">;
|
|
246
|
+
export declare function actaEvent(kind: "CloseOracle", data: GetDiscriminatedUnionVariantContent<ActaEventArgs, "__kind", "CloseOracle">): GetDiscriminatedUnionVariant<ActaEventArgs, "__kind", "CloseOracle">;
|
|
247
|
+
export declare function isActaEvent<K extends ActaEvent["__kind"]>(kind: K, value: ActaEvent): value is ActaEvent & {
|
|
248
|
+
__kind: K;
|
|
249
|
+
};
|