@useaccord/sdk 0.1.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/README.md +126 -0
- package/dist/accord.d.ts +43 -0
- package/dist/accord.d.ts.map +1 -0
- package/dist/adapter.d.ts +39 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/chunk-7QVYU63E.js +7 -0
- package/dist/chunk-7QVYU63E.js.map +1 -0
- package/dist/constants.d.ts +83 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/domain.d.ts +73 -0
- package/dist/domain.d.ts.map +1 -0
- package/dist/errors.d.ts +64 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/evidence/crypto.d.ts +12 -0
- package/dist/evidence/crypto.d.ts.map +1 -0
- package/dist/evidence/ecies.d.ts +45 -0
- package/dist/evidence/ecies.d.ts.map +1 -0
- package/dist/evidence/fetch.d.ts +20 -0
- package/dist/evidence/fetch.d.ts.map +1 -0
- package/dist/evidence/index.d.ts +27 -0
- package/dist/evidence/index.d.ts.map +1 -0
- package/dist/evidence/index.js +392 -0
- package/dist/evidence/index.js.map +1 -0
- package/dist/evidence/keys.d.ts +33 -0
- package/dist/evidence/keys.d.ts.map +1 -0
- package/dist/evidence/manifest.d.ts +47 -0
- package/dist/evidence/manifest.d.ts.map +1 -0
- package/dist/evidence/options.d.ts +14 -0
- package/dist/evidence/options.d.ts.map +1 -0
- package/dist/evidence/parse.d.ts +39 -0
- package/dist/evidence/parse.d.ts.map +1 -0
- package/dist/evidence/publish.d.ts +45 -0
- package/dist/evidence/publish.d.ts.map +1 -0
- package/dist/fetch.d.ts +24 -0
- package/dist/fetch.d.ts.map +1 -0
- package/dist/generated/accounts/accordState.d.ts +58 -0
- package/dist/generated/accounts/accordState.d.ts.map +1 -0
- package/dist/generated/accounts/appealBond.d.ts +61 -0
- package/dist/generated/accounts/appealBond.d.ts.map +1 -0
- package/dist/generated/accounts/dispute.d.ts +213 -0
- package/dist/generated/accounts/dispute.d.ts.map +1 -0
- package/dist/generated/accounts/index.d.ts +15 -0
- package/dist/generated/accounts/index.d.ts.map +1 -0
- package/dist/generated/accounts/jurorStake.d.ts +137 -0
- package/dist/generated/accounts/jurorStake.d.ts.map +1 -0
- package/dist/generated/accounts/pendingUpdate.d.ts +43 -0
- package/dist/generated/accounts/pendingUpdate.d.ts.map +1 -0
- package/dist/generated/accounts/round.d.ts +143 -0
- package/dist/generated/accounts/round.d.ts.map +1 -0
- package/dist/generated/accounts/subaccord.d.ts +300 -0
- package/dist/generated/accounts/subaccord.d.ts.map +1 -0
- package/dist/generated/errors/accord.d.ts +160 -0
- package/dist/generated/errors/accord.d.ts.map +1 -0
- package/dist/generated/errors/index.d.ts +9 -0
- package/dist/generated/errors/index.d.ts.map +1 -0
- package/dist/generated/index.d.ts +14 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/instructions/appeal.d.ts +107 -0
- package/dist/generated/instructions/appeal.d.ts.map +1 -0
- package/dist/generated/instructions/cancelDispute.d.ts +73 -0
- package/dist/generated/instructions/cancelDispute.d.ts.map +1 -0
- package/dist/generated/instructions/claimAppealRefund.d.ts +91 -0
- package/dist/generated/instructions/claimAppealRefund.d.ts.map +1 -0
- package/dist/generated/instructions/commit.d.ts +50 -0
- package/dist/generated/instructions/commit.d.ts.map +1 -0
- package/dist/generated/instructions/commitVrfCallback.d.ts +47 -0
- package/dist/generated/instructions/commitVrfCallback.d.ts.map +1 -0
- package/dist/generated/instructions/createDispute.d.ts +136 -0
- package/dist/generated/instructions/createDispute.d.ts.map +1 -0
- package/dist/generated/instructions/createSubaccord.d.ts +196 -0
- package/dist/generated/instructions/createSubaccord.d.ts.map +1 -0
- package/dist/generated/instructions/drawSeat.d.ts +74 -0
- package/dist/generated/instructions/drawSeat.d.ts.map +1 -0
- package/dist/generated/instructions/executeSubaccordUpdate.d.ts +43 -0
- package/dist/generated/instructions/executeSubaccordUpdate.d.ts.map +1 -0
- package/dist/generated/instructions/executeUnpause.d.ts +59 -0
- package/dist/generated/instructions/executeUnpause.d.ts.map +1 -0
- package/dist/generated/instructions/finalizeDispute.d.ts +46 -0
- package/dist/generated/instructions/finalizeDispute.d.ts.map +1 -0
- package/dist/generated/instructions/finalizeRound.d.ts +46 -0
- package/dist/generated/instructions/finalizeRound.d.ts.map +1 -0
- package/dist/generated/instructions/getRuling.d.ts +42 -0
- package/dist/generated/instructions/getRuling.d.ts.map +1 -0
- package/dist/generated/instructions/health.d.ts +37 -0
- package/dist/generated/instructions/health.d.ts.map +1 -0
- package/dist/generated/instructions/index.d.ts +37 -0
- package/dist/generated/instructions/index.d.ts.map +1 -0
- package/dist/generated/instructions/initializePause.d.ts +51 -0
- package/dist/generated/instructions/initializePause.d.ts.map +1 -0
- package/dist/generated/instructions/pause.d.ts +47 -0
- package/dist/generated/instructions/pause.d.ts.map +1 -0
- package/dist/generated/instructions/proposeSubaccordUpdate.d.ts +90 -0
- package/dist/generated/instructions/proposeSubaccordUpdate.d.ts.map +1 -0
- package/dist/generated/instructions/proposeUnpause.d.ts +47 -0
- package/dist/generated/instructions/proposeUnpause.d.ts.map +1 -0
- package/dist/generated/instructions/pruneJuror.d.ts +68 -0
- package/dist/generated/instructions/pruneJuror.d.ts.map +1 -0
- package/dist/generated/instructions/reclaimSlot.d.ts +48 -0
- package/dist/generated/instructions/reclaimSlot.d.ts.map +1 -0
- package/dist/generated/instructions/reconcileStake.d.ts +48 -0
- package/dist/generated/instructions/reconcileStake.d.ts.map +1 -0
- package/dist/generated/instructions/redraw.d.ts +86 -0
- package/dist/generated/instructions/redraw.d.ts.map +1 -0
- package/dist/generated/instructions/requestVrf.d.ts +71 -0
- package/dist/generated/instructions/requestVrf.d.ts.map +1 -0
- package/dist/generated/instructions/requestWithdraw.d.ts +61 -0
- package/dist/generated/instructions/requestWithdraw.d.ts.map +1 -0
- package/dist/generated/instructions/reveal.d.ts +53 -0
- package/dist/generated/instructions/reveal.d.ts.map +1 -0
- package/dist/generated/instructions/settleRound.d.ts +60 -0
- package/dist/generated/instructions/settleRound.d.ts.map +1 -0
- package/dist/generated/instructions/stake.d.ts +98 -0
- package/dist/generated/instructions/stake.d.ts.map +1 -0
- package/dist/generated/instructions/withdraw.d.ts +67 -0
- package/dist/generated/instructions/withdraw.d.ts.map +1 -0
- package/dist/generated/instructions/withdrawFees.d.ts +67 -0
- package/dist/generated/instructions/withdrawFees.d.ts.map +1 -0
- package/dist/generated/pdas/accordState.d.ts +12 -0
- package/dist/generated/pdas/accordState.d.ts.map +1 -0
- package/dist/generated/pdas/appealBond.d.ts +16 -0
- package/dist/generated/pdas/appealBond.d.ts.map +1 -0
- package/dist/generated/pdas/dispute.d.ts +16 -0
- package/dist/generated/pdas/dispute.d.ts.map +1 -0
- package/dist/generated/pdas/index.d.ts +16 -0
- package/dist/generated/pdas/index.d.ts.map +1 -0
- package/dist/generated/pdas/jurorStake.d.ts +16 -0
- package/dist/generated/pdas/jurorStake.d.ts.map +1 -0
- package/dist/generated/pdas/pendingUpdate.d.ts +16 -0
- package/dist/generated/pdas/pendingUpdate.d.ts.map +1 -0
- package/dist/generated/pdas/programIdentity.d.ts +12 -0
- package/dist/generated/pdas/programIdentity.d.ts.map +1 -0
- package/dist/generated/pdas/round.d.ts +16 -0
- package/dist/generated/pdas/round.d.ts.map +1 -0
- package/dist/generated/pdas/subaccord.d.ts +16 -0
- package/dist/generated/pdas/subaccord.d.ts.map +1 -0
- package/dist/generated/programs/accord.d.ts +182 -0
- package/dist/generated/programs/accord.d.ts.map +1 -0
- package/dist/generated/programs/index.d.ts +9 -0
- package/dist/generated/programs/index.d.ts.map +1 -0
- package/dist/generated/types/aggregation.d.ts +25 -0
- package/dist/generated/types/aggregation.d.ts.map +1 -0
- package/dist/generated/types/caseTerms.d.ts +87 -0
- package/dist/generated/types/caseTerms.d.ts.map +1 -0
- package/dist/generated/types/disputeState.d.ts +34 -0
- package/dist/generated/types/disputeState.d.ts.map +1 -0
- package/dist/generated/types/index.d.ts +15 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/leafClaim.d.ts +27 -0
- package/dist/generated/types/leafClaim.d.ts.map +1 -0
- package/dist/generated/types/mSTNode.d.ts +26 -0
- package/dist/generated/types/mSTNode.d.ts.map +1 -0
- package/dist/generated/types/shortfallPolicy.d.ts +23 -0
- package/dist/generated/types/shortfallPolicy.d.ts.map +1 -0
- package/dist/generated/types/updatePayload.d.ts +107 -0
- package/dist/generated/types/updatePayload.d.ts.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8714 -0
- package/dist/index.js.map +1 -0
- package/dist/methods/appeal.d.ts +131 -0
- package/dist/methods/appeal.d.ts.map +1 -0
- package/dist/methods/dispute.d.ts +177 -0
- package/dist/methods/dispute.d.ts.map +1 -0
- package/dist/methods/disputePhase.d.ts +34 -0
- package/dist/methods/disputePhase.d.ts.map +1 -0
- package/dist/methods/lifecycle.d.ts +228 -0
- package/dist/methods/lifecycle.d.ts.map +1 -0
- package/dist/methods/mst.d.ts +100 -0
- package/dist/methods/mst.d.ts.map +1 -0
- package/dist/methods/settlement.d.ts +69 -0
- package/dist/methods/settlement.d.ts.map +1 -0
- package/dist/methods/stakeFlow.d.ts +65 -0
- package/dist/methods/stakeFlow.d.ts.map +1 -0
- package/dist/methods/staking.d.ts +220 -0
- package/dist/methods/staking.d.ts.map +1 -0
- package/dist/methods/voting.d.ts +227 -0
- package/dist/methods/voting.d.ts.map +1 -0
- package/dist/methods/vrf.d.ts +143 -0
- package/dist/methods/vrf.d.ts.map +1 -0
- package/dist/methods.d.ts +79 -0
- package/dist/methods.d.ts.map +1 -0
- package/dist/pda.d.ts +37 -0
- package/dist/pda.d.ts.map +1 -0
- package/dist/queries.d.ts +27 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/query.d.ts +30 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/token.d.ts +24 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/wallet.d.ts +30 -0
- package/dist/wallet.d.ts.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface PublishParams {
|
|
2
|
+
/** Daemon base URL (app-side `EVIDENCE_DAEMON_URL`). */
|
|
3
|
+
endpoint: string;
|
|
4
|
+
subaccord: string;
|
|
5
|
+
dispute: string;
|
|
6
|
+
/** The single manifest buffer (same bytes that produced `evidence_hash`). */
|
|
7
|
+
manifest: Uint8Array;
|
|
8
|
+
/** Evidence operator's raw Ed25519 public key (32 bytes, decoded from address). */
|
|
9
|
+
operatorPub: Uint8Array;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Encrypt the manifest to the operator and POST it to the daemon.
|
|
13
|
+
* Daemon ingest is idempotent on `(dispute, round, plaintext_hash)` — same
|
|
14
|
+
* manifest → 201 no-op, first POST wins. Safe to retry without re-creating
|
|
15
|
+
* the dispute.
|
|
16
|
+
*/
|
|
17
|
+
export declare function publishEvidence(params: PublishParams): Promise<void>;
|
|
18
|
+
export interface PublishSynodParams {
|
|
19
|
+
/** Daemon base URL (app-side `EVIDENCE_DAEMON_URL`). */
|
|
20
|
+
endpoint: string;
|
|
21
|
+
/** The SynodCase PDA — the pre-dispute grouping key. */
|
|
22
|
+
casePda: string;
|
|
23
|
+
/** Roster slot of the joining party (0–6). */
|
|
24
|
+
slot: number;
|
|
25
|
+
/** The party's manifest buffer (same bytes that produced the join hash). */
|
|
26
|
+
manifest: Uint8Array;
|
|
27
|
+
/** Evidence operator's raw Ed25519 public key (32 bytes, decoded from address). */
|
|
28
|
+
operatorPub: Uint8Array;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Encrypt the party's manifest to the operator and POST it to the daemon's
|
|
32
|
+
* synod pre-dispute grouping route (`POST /evidence/synod/{case}/{slot}`,
|
|
33
|
+
* milestone accord-daq8). Unauthenticated by design: the on-chain
|
|
34
|
+
* `SynodCase.evidence[slot]` hash committed at `join` IS the commit; pushes
|
|
35
|
+
* are gated chain-side (case exists, slot live, dispute unbound). Same-bundle
|
|
36
|
+
* re-pushes are 201-idempotent server-side; a different hash for a filled
|
|
37
|
+
* slot is a 409.
|
|
38
|
+
*/
|
|
39
|
+
export declare function publishSynodEvidence(params: PublishSynodParams): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Verify `sha256(manifest) == evidenceHash`. Throws on mismatch — the recovery
|
|
42
|
+
* upload is rejected if the manifest doesn't match what was committed on-chain.
|
|
43
|
+
*/
|
|
44
|
+
export declare function verifyManifestHash(manifest: Uint8Array, evidenceHash: Uint8Array): Promise<void>;
|
|
45
|
+
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/evidence/publish.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,QAAQ,EAAE,UAAU,CAAC;IACrB,mFAAmF;IACnF,WAAW,EAAE,UAAU,CAAC;CACzB;AAqBD;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAO1E;AAED,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,EAAE,UAAU,CAAC;IACrB,mFAAmF;IACnF,WAAW,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,UAAU,GACvB,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
package/dist/fetch.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed account fetchers — thin re-exports of the generated Kit fetchers.
|
|
3
|
+
*
|
|
4
|
+
* The generated account modules (`./generated/accounts/*`) already export
|
|
5
|
+
* `fetchX(rpc, address)` / `fetchMaybeX(rpc, address)` that work over a raw
|
|
6
|
+
* Kit `Rpc` (e.g. `createSolanaRpc(...)` or `Accord#rpc`). Earlier wrappers
|
|
7
|
+
* here routed through `accord.client`, which requires a `ClientWithRpc` and
|
|
8
|
+
* breaks when the facade is built over a bare RPC — so we delegate to the
|
|
9
|
+
* generated functions directly and pass `rpc` as the first argument.
|
|
10
|
+
*
|
|
11
|
+
* Each returns a fully typed `Account<T>` (or `MaybeAccount<T>`); no raw bytes
|
|
12
|
+
* leak to the caller. `fetchXMaybe` aliases the generated `fetchMaybeX` name to
|
|
13
|
+
* keep the public API stable.
|
|
14
|
+
*
|
|
15
|
+
* @see ADR-0010
|
|
16
|
+
*/
|
|
17
|
+
export { fetchAppealBond, fetchMaybeAppealBond as fetchAppealBondMaybe, } from "./generated/accounts/appealBond.js";
|
|
18
|
+
export { fetchDispute, fetchMaybeDispute as fetchDisputeMaybe, } from "./generated/accounts/dispute.js";
|
|
19
|
+
export { fetchJurorStake, fetchMaybeJurorStake as fetchJurorStakeMaybe, } from "./generated/accounts/jurorStake.js";
|
|
20
|
+
export { fetchAccordState, fetchMaybeAccordState as fetchAccordStateMaybe, } from "./generated/accounts/accordState.js";
|
|
21
|
+
export { fetchPendingUpdate, fetchMaybePendingUpdate as fetchPendingUpdateMaybe, } from "./generated/accounts/pendingUpdate.js";
|
|
22
|
+
export { fetchRound, fetchMaybeRound as fetchRoundMaybe, } from "./generated/accounts/round.js";
|
|
23
|
+
export { fetchSubaccord, fetchMaybeSubaccord as fetchSubaccordMaybe, } from "./generated/accounts/subaccord.js";
|
|
24
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,IAAI,oBAAoB,GAC7C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,iBAAiB,IAAI,iBAAiB,GACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,eAAe,EACf,oBAAoB,IAAI,oBAAoB,GAC7C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,IAAI,qBAAqB,GAC/C,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,kBAAkB,EAClB,uBAAuB,IAAI,uBAAuB,GACnD,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,eAAe,IAAI,eAAe,GACnC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,cAAc,EACd,mBAAmB,IAAI,mBAAmB,GAC3C,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type Option, type OptionOrNullable, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export declare const ACCORD_STATE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
10
|
+
export declare function getAccordStateDiscriminatorBytes(): ReadonlyUint8Array;
|
|
11
|
+
export type AccordState = {
|
|
12
|
+
discriminator: ReadonlyUint8Array;
|
|
13
|
+
/** The multisig/upgrade-authority permitted to pause and propose unpause. */
|
|
14
|
+
authority: Address;
|
|
15
|
+
paused: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* `Some(slot)` once `propose_unpause` has armed an unpause; cleared on
|
|
18
|
+
* `execute_unpause` (or on a fresh `pause`).
|
|
19
|
+
*/
|
|
20
|
+
pendingUnpauseAfter: Option<bigint>;
|
|
21
|
+
bump: number;
|
|
22
|
+
/**
|
|
23
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
24
|
+
* must stay the last field — new fields are carved out of it without
|
|
25
|
+
* moving existing offsets or resizing the account.
|
|
26
|
+
*/
|
|
27
|
+
padding: ReadonlyUint8Array;
|
|
28
|
+
};
|
|
29
|
+
export type AccordStateArgs = {
|
|
30
|
+
/** The multisig/upgrade-authority permitted to pause and propose unpause. */
|
|
31
|
+
authority: Address;
|
|
32
|
+
paused: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* `Some(slot)` once `propose_unpause` has armed an unpause; cleared on
|
|
35
|
+
* `execute_unpause` (or on a fresh `pause`).
|
|
36
|
+
*/
|
|
37
|
+
pendingUnpauseAfter: OptionOrNullable<number | bigint>;
|
|
38
|
+
bump: number;
|
|
39
|
+
/**
|
|
40
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
41
|
+
* must stay the last field — new fields are carved out of it without
|
|
42
|
+
* moving existing offsets or resizing the account.
|
|
43
|
+
*/
|
|
44
|
+
padding: ReadonlyUint8Array;
|
|
45
|
+
};
|
|
46
|
+
/** Gets the encoder for {@link AccordStateArgs} account data. */
|
|
47
|
+
export declare function getAccordStateEncoder(): Encoder<AccordStateArgs>;
|
|
48
|
+
/** Gets the decoder for {@link AccordState} account data. */
|
|
49
|
+
export declare function getAccordStateDecoder(): Decoder<AccordState>;
|
|
50
|
+
/** Gets the codec for {@link AccordState} account data. */
|
|
51
|
+
export declare function getAccordStateCodec(): Codec<AccordStateArgs, AccordState>;
|
|
52
|
+
export declare function decodeAccordState<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<AccordState, TAddress>;
|
|
53
|
+
export declare function decodeAccordState<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<AccordState, TAddress>;
|
|
54
|
+
export declare function fetchAccordState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<AccordState, TAddress>>;
|
|
55
|
+
export declare function fetchMaybeAccordState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<AccordState, TAddress>>;
|
|
56
|
+
export declare function fetchAllAccordState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<AccordState>[]>;
|
|
57
|
+
export declare function fetchAllMaybeAccordState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<AccordState>[]>;
|
|
58
|
+
//# sourceMappingURL=accordState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordState.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/accordState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,EAkBpB,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,k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AUvC,wBAAsB,gBAAgB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EACrE,GAAG,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAC9C,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC1B,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAIzC;AAED,wBAAsB,qBAAqB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EAC1E,GAAG,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAC9C,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC1B,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAG9C;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAIjC;AAED,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC,CAGtC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export declare const APPEAL_BOND_DISCRIMINATOR: ReadonlyUint8Array;
|
|
10
|
+
export declare function getAppealBondDiscriminatorBytes(): ReadonlyUint8Array;
|
|
11
|
+
export type AppealBond = {
|
|
12
|
+
discriminator: ReadonlyUint8Array;
|
|
13
|
+
dispute: Address;
|
|
14
|
+
roundIdx: number;
|
|
15
|
+
appellant: Address;
|
|
16
|
+
amount: bigint;
|
|
17
|
+
/**
|
|
18
|
+
* Winning value of the round being appealed (set at `appeal` time).
|
|
19
|
+
* Option index for `Plurality`, median for `Median` (u64 since ADR-0025).
|
|
20
|
+
*/
|
|
21
|
+
priorResult: bigint;
|
|
22
|
+
bump: number;
|
|
23
|
+
/**
|
|
24
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
25
|
+
* must stay the last field — new fields are carved out of it without
|
|
26
|
+
* moving existing offsets or resizing the account.
|
|
27
|
+
*/
|
|
28
|
+
padding: ReadonlyUint8Array;
|
|
29
|
+
};
|
|
30
|
+
export type AppealBondArgs = {
|
|
31
|
+
dispute: Address;
|
|
32
|
+
roundIdx: number;
|
|
33
|
+
appellant: Address;
|
|
34
|
+
amount: number | bigint;
|
|
35
|
+
/**
|
|
36
|
+
* Winning value of the round being appealed (set at `appeal` time).
|
|
37
|
+
* Option index for `Plurality`, median for `Median` (u64 since ADR-0025).
|
|
38
|
+
*/
|
|
39
|
+
priorResult: number | bigint;
|
|
40
|
+
bump: number;
|
|
41
|
+
/**
|
|
42
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
43
|
+
* must stay the last field — new fields are carved out of it without
|
|
44
|
+
* moving existing offsets or resizing the account.
|
|
45
|
+
*/
|
|
46
|
+
padding: ReadonlyUint8Array;
|
|
47
|
+
};
|
|
48
|
+
/** Gets the encoder for {@link AppealBondArgs} account data. */
|
|
49
|
+
export declare function getAppealBondEncoder(): FixedSizeEncoder<AppealBondArgs>;
|
|
50
|
+
/** Gets the decoder for {@link AppealBond} account data. */
|
|
51
|
+
export declare function getAppealBondDecoder(): FixedSizeDecoder<AppealBond>;
|
|
52
|
+
/** Gets the codec for {@link AppealBond} account data. */
|
|
53
|
+
export declare function getAppealBondCodec(): FixedSizeCodec<AppealBondArgs, AppealBond>;
|
|
54
|
+
export declare function decodeAppealBond<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<AppealBond, TAddress>;
|
|
55
|
+
export declare function decodeAppealBond<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<AppealBond, TAddress>;
|
|
56
|
+
export declare function fetchAppealBond<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<AppealBond, TAddress>>;
|
|
57
|
+
export declare function fetchMaybeAppealBond<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<AppealBond, TAddress>>;
|
|
58
|
+
export declare function fetchAllAppealBond(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<AppealBond>[]>;
|
|
59
|
+
export declare function fetchAllMaybeAppealBond(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<AppealBond>[]>;
|
|
60
|
+
export declare function getAppealBondSize(): number;
|
|
61
|
+
//# sourceMappingURL=appealBond.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appealBond.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/appealBond.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAA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C,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC,CAGrC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
|
@@ -0,0 +1,213 @@
|
|
|
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type Option, type OptionOrNullable, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
import { type CaseTerms, type CaseTermsArgs, type DisputeState, type DisputeStateArgs } from "../types";
|
|
10
|
+
export declare const DISPUTE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
|
+
export declare function getDisputeDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type Dispute = {
|
|
13
|
+
discriminator: ReadonlyUint8Array;
|
|
14
|
+
subaccord: Address;
|
|
15
|
+
filer: Address;
|
|
16
|
+
nonce: bigint;
|
|
17
|
+
numOptions: number;
|
|
18
|
+
options: Array<ReadonlyUint8Array>;
|
|
19
|
+
/**
|
|
20
|
+
* Per-round evidence commitments (ADR-0006 / milestone accord-qp7c).
|
|
21
|
+
* Index 0 = round-0 (filing); each appeal round may optionally bring new
|
|
22
|
+
* evidence at `[current_round + 1]`. `[0u8; 32]` sentinel = no new
|
|
23
|
+
* evidence that round (jurors reuse prior rounds').
|
|
24
|
+
*/
|
|
25
|
+
evidenceHashes: Array<ReadonlyUint8Array>;
|
|
26
|
+
state: DisputeState;
|
|
27
|
+
currentRound: number;
|
|
28
|
+
/**
|
|
29
|
+
* Filing-time snapshot of the Subaccord's economics (Ugly 6). Immutable
|
|
30
|
+
* for the dispute's life; governance changes via ADR-0005 affect only
|
|
31
|
+
* disputes filed after the change lands.
|
|
32
|
+
*/
|
|
33
|
+
terms: CaseTerms;
|
|
34
|
+
/**
|
|
35
|
+
* The round's winning value once `state == Final`; `u64::MAX` until
|
|
36
|
+
* then. For `Plurality` disputes this is the winning option index; for
|
|
37
|
+
* `Median` disputes (ADR-0025) it is the final median — a u64
|
|
38
|
+
* fixed-point value the Arbitrable interprets (e.g. base units of the
|
|
39
|
+
* settlement mint, 6 decimals for USDC). Sentinel (not `Option<u64>`):
|
|
40
|
+
* keeps the account fixed-size — the SBF `InitSpace` for `Option<T>`
|
|
41
|
+
* undercounts its `Some` variant by the option tag, which made
|
|
42
|
+
* `finalize_dispute`'s `Some` write overflow the account (Anchor
|
|
43
|
+
* `AccountDidNotSerialize` #3004). Mirrors `Round`'s u64::MAX sentinels
|
|
44
|
+
* for `reveals`/`result`.
|
|
45
|
+
*/
|
|
46
|
+
finalRuling: bigint;
|
|
47
|
+
/**
|
|
48
|
+
* Unix timestamp stamped at the single `Final` transition
|
|
49
|
+
* (`finalize_dispute`); `0` until then. Canonical "verdict time" anchor
|
|
50
|
+
* for downstream consumers (e.g. the Betline primitive's bettor reveal
|
|
51
|
+
* window, which must open exactly when the dispute finalizes). `0` is a
|
|
52
|
+
* safe sentinel: real Unix time is never 0 for on-chain disputes.
|
|
53
|
+
*/
|
|
54
|
+
finalizedAt: bigint;
|
|
55
|
+
/**
|
|
56
|
+
* Round-0 filing fee deposited by the filer (`N · fee_per_juror` at
|
|
57
|
+
* creation). Decremented as round-0 jurors earn (`finalize_round`). This
|
|
58
|
+
* is the filer's refundable pool on cancel/redraw-exhaustion. Appeal-round
|
|
59
|
+
* fees live in their `AppealBond`, NOT here (bean accord-xftx).
|
|
60
|
+
*/
|
|
61
|
+
feePaid: bigint;
|
|
62
|
+
/**
|
|
63
|
+
* VRF result committed once via `commit_vrf` (ADR-0009). `None` until
|
|
64
|
+
* committed; `Some(vrf_result)` after. The draw reads this; the caller
|
|
65
|
+
* cannot swap it between retries.
|
|
66
|
+
*/
|
|
67
|
+
committedVrf: Option<ReadonlyUint8Array>;
|
|
68
|
+
/**
|
|
69
|
+
* Accumulator root frozen atomically when the VRF lands in
|
|
70
|
+
* `commit_vrf_callback` (ADR-0012). All `draw_seat` calls for every round
|
|
71
|
+
* of this dispute select against this one root (per-seat coherence +
|
|
72
|
+
* manipulation resistance). `[0;32]` until frozen; readable once
|
|
73
|
+
* `committed_vrf.is_some()`.
|
|
74
|
+
*/
|
|
75
|
+
frozenRoot: ReadonlyUint8Array;
|
|
76
|
+
/**
|
|
77
|
+
* Total stake captured with `frozen_root` at freeze time. Drives
|
|
78
|
+
* sortition (`r_i % frozen_total_stake`).
|
|
79
|
+
*/
|
|
80
|
+
frozenTotalStake: bigint;
|
|
81
|
+
/**
|
|
82
|
+
* Unix timestamp at `create_dispute` (Ugly 4). Drives the pre-draw
|
|
83
|
+
* `cancel_dispute` timeout: if the dispute has not been drawn within
|
|
84
|
+
* `PRE_DRAW_CANCEL_TIMEOUT_SECS`, any cranker may cancel + refund the filer.
|
|
85
|
+
*/
|
|
86
|
+
filedAt: bigint;
|
|
87
|
+
bump: number;
|
|
88
|
+
/**
|
|
89
|
+
* Seats landed for the CURRENT round so far (H-2, security review
|
|
90
|
+
* 2026-08-19). Maintained by `draw_seat` (mirrors `round.juror_count`
|
|
91
|
+
* after each seat) and reset to 0 by `appeal` (fresh round) and the
|
|
92
|
+
* `redraw` clear. It is the on-chain PROOF that a partially drawn Round
|
|
93
|
+
* account exists while the dispute still sits in `Created` — without it,
|
|
94
|
+
* `cancel_dispute`'s pre-draw branch cannot tell "no seats drawn" (no
|
|
95
|
+
* Round PDA exists, nothing to pass) from "cranker omitted the accounts"
|
|
96
|
+
* (jurors strand), so it cannot safely require them. Carved out of the
|
|
97
|
+
* former padding: account size and all prior field offsets unchanged.
|
|
98
|
+
*/
|
|
99
|
+
drawnSeats: number;
|
|
100
|
+
/**
|
|
101
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
102
|
+
* must stay the last field — new fields are carved out of it without
|
|
103
|
+
* moving existing offsets or resizing the account.
|
|
104
|
+
*/
|
|
105
|
+
padding: ReadonlyUint8Array;
|
|
106
|
+
};
|
|
107
|
+
export type DisputeArgs = {
|
|
108
|
+
subaccord: Address;
|
|
109
|
+
filer: Address;
|
|
110
|
+
nonce: number | bigint;
|
|
111
|
+
numOptions: number;
|
|
112
|
+
options: Array<ReadonlyUint8Array>;
|
|
113
|
+
/**
|
|
114
|
+
* Per-round evidence commitments (ADR-0006 / milestone accord-qp7c).
|
|
115
|
+
* Index 0 = round-0 (filing); each appeal round may optionally bring new
|
|
116
|
+
* evidence at `[current_round + 1]`. `[0u8; 32]` sentinel = no new
|
|
117
|
+
* evidence that round (jurors reuse prior rounds').
|
|
118
|
+
*/
|
|
119
|
+
evidenceHashes: Array<ReadonlyUint8Array>;
|
|
120
|
+
state: DisputeStateArgs;
|
|
121
|
+
currentRound: number;
|
|
122
|
+
/**
|
|
123
|
+
* Filing-time snapshot of the Subaccord's economics (Ugly 6). Immutable
|
|
124
|
+
* for the dispute's life; governance changes via ADR-0005 affect only
|
|
125
|
+
* disputes filed after the change lands.
|
|
126
|
+
*/
|
|
127
|
+
terms: CaseTermsArgs;
|
|
128
|
+
/**
|
|
129
|
+
* The round's winning value once `state == Final`; `u64::MAX` until
|
|
130
|
+
* then. For `Plurality` disputes this is the winning option index; for
|
|
131
|
+
* `Median` disputes (ADR-0025) it is the final median — a u64
|
|
132
|
+
* fixed-point value the Arbitrable interprets (e.g. base units of the
|
|
133
|
+
* settlement mint, 6 decimals for USDC). Sentinel (not `Option<u64>`):
|
|
134
|
+
* keeps the account fixed-size — the SBF `InitSpace` for `Option<T>`
|
|
135
|
+
* undercounts its `Some` variant by the option tag, which made
|
|
136
|
+
* `finalize_dispute`'s `Some` write overflow the account (Anchor
|
|
137
|
+
* `AccountDidNotSerialize` #3004). Mirrors `Round`'s u64::MAX sentinels
|
|
138
|
+
* for `reveals`/`result`.
|
|
139
|
+
*/
|
|
140
|
+
finalRuling: number | bigint;
|
|
141
|
+
/**
|
|
142
|
+
* Unix timestamp stamped at the single `Final` transition
|
|
143
|
+
* (`finalize_dispute`); `0` until then. Canonical "verdict time" anchor
|
|
144
|
+
* for downstream consumers (e.g. the Betline primitive's bettor reveal
|
|
145
|
+
* window, which must open exactly when the dispute finalizes). `0` is a
|
|
146
|
+
* safe sentinel: real Unix time is never 0 for on-chain disputes.
|
|
147
|
+
*/
|
|
148
|
+
finalizedAt: number | bigint;
|
|
149
|
+
/**
|
|
150
|
+
* Round-0 filing fee deposited by the filer (`N · fee_per_juror` at
|
|
151
|
+
* creation). Decremented as round-0 jurors earn (`finalize_round`). This
|
|
152
|
+
* is the filer's refundable pool on cancel/redraw-exhaustion. Appeal-round
|
|
153
|
+
* fees live in their `AppealBond`, NOT here (bean accord-xftx).
|
|
154
|
+
*/
|
|
155
|
+
feePaid: number | bigint;
|
|
156
|
+
/**
|
|
157
|
+
* VRF result committed once via `commit_vrf` (ADR-0009). `None` until
|
|
158
|
+
* committed; `Some(vrf_result)` after. The draw reads this; the caller
|
|
159
|
+
* cannot swap it between retries.
|
|
160
|
+
*/
|
|
161
|
+
committedVrf: OptionOrNullable<ReadonlyUint8Array>;
|
|
162
|
+
/**
|
|
163
|
+
* Accumulator root frozen atomically when the VRF lands in
|
|
164
|
+
* `commit_vrf_callback` (ADR-0012). All `draw_seat` calls for every round
|
|
165
|
+
* of this dispute select against this one root (per-seat coherence +
|
|
166
|
+
* manipulation resistance). `[0;32]` until frozen; readable once
|
|
167
|
+
* `committed_vrf.is_some()`.
|
|
168
|
+
*/
|
|
169
|
+
frozenRoot: ReadonlyUint8Array;
|
|
170
|
+
/**
|
|
171
|
+
* Total stake captured with `frozen_root` at freeze time. Drives
|
|
172
|
+
* sortition (`r_i % frozen_total_stake`).
|
|
173
|
+
*/
|
|
174
|
+
frozenTotalStake: number | bigint;
|
|
175
|
+
/**
|
|
176
|
+
* Unix timestamp at `create_dispute` (Ugly 4). Drives the pre-draw
|
|
177
|
+
* `cancel_dispute` timeout: if the dispute has not been drawn within
|
|
178
|
+
* `PRE_DRAW_CANCEL_TIMEOUT_SECS`, any cranker may cancel + refund the filer.
|
|
179
|
+
*/
|
|
180
|
+
filedAt: number | bigint;
|
|
181
|
+
bump: number;
|
|
182
|
+
/**
|
|
183
|
+
* Seats landed for the CURRENT round so far (H-2, security review
|
|
184
|
+
* 2026-08-19). Maintained by `draw_seat` (mirrors `round.juror_count`
|
|
185
|
+
* after each seat) and reset to 0 by `appeal` (fresh round) and the
|
|
186
|
+
* `redraw` clear. It is the on-chain PROOF that a partially drawn Round
|
|
187
|
+
* account exists while the dispute still sits in `Created` — without it,
|
|
188
|
+
* `cancel_dispute`'s pre-draw branch cannot tell "no seats drawn" (no
|
|
189
|
+
* Round PDA exists, nothing to pass) from "cranker omitted the accounts"
|
|
190
|
+
* (jurors strand), so it cannot safely require them. Carved out of the
|
|
191
|
+
* former padding: account size and all prior field offsets unchanged.
|
|
192
|
+
*/
|
|
193
|
+
drawnSeats: number;
|
|
194
|
+
/**
|
|
195
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
196
|
+
* must stay the last field — new fields are carved out of it without
|
|
197
|
+
* moving existing offsets or resizing the account.
|
|
198
|
+
*/
|
|
199
|
+
padding: ReadonlyUint8Array;
|
|
200
|
+
};
|
|
201
|
+
/** Gets the encoder for {@link DisputeArgs} account data. */
|
|
202
|
+
export declare function getDisputeEncoder(): Encoder<DisputeArgs>;
|
|
203
|
+
/** Gets the decoder for {@link Dispute} account data. */
|
|
204
|
+
export declare function getDisputeDecoder(): Decoder<Dispute>;
|
|
205
|
+
/** Gets the codec for {@link Dispute} account data. */
|
|
206
|
+
export declare function getDisputeCodec(): Codec<DisputeArgs, Dispute>;
|
|
207
|
+
export declare function decodeDispute<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Dispute, TAddress>;
|
|
208
|
+
export declare function decodeDispute<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Dispute, TAddress>;
|
|
209
|
+
export declare function fetchDispute<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Dispute, TAddress>>;
|
|
210
|
+
export declare function fetchMaybeDispute<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Dispute, TAddress>>;
|
|
211
|
+
export declare function fetchAllDispute(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Dispute>[]>;
|
|
212
|
+
export declare function fetchAllMaybeDispute(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Dispute>[]>;
|
|
213
|
+
//# sourceMappingURL=dispute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispute.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/dispute.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,EAsBpB,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,qBAAqB,EAAE,kBAElC,CAAC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,MAAM,GAAG,MAAM,EACjE,GAAG,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAC9C,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC1B,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAIrC;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EACtE,GAAG,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAC9C,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC1B,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAG1C;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAI7B;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC/C,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,EACzB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAGlC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export * from "./accordState";
|
|
9
|
+
export * from "./appealBond";
|
|
10
|
+
export * from "./dispute";
|
|
11
|
+
export * from "./jurorStake";
|
|
12
|
+
export * from "./pendingUpdate";
|
|
13
|
+
export * from "./round";
|
|
14
|
+
export * from "./subaccord";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
|
|
9
|
+
export declare const JUROR_STAKE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
10
|
+
export declare function getJurorStakeDiscriminatorBytes(): ReadonlyUint8Array;
|
|
11
|
+
export type JurorStake = {
|
|
12
|
+
discriminator: ReadonlyUint8Array;
|
|
13
|
+
subaccord: Address;
|
|
14
|
+
juror: Address;
|
|
15
|
+
/** Collateral (stake_token). Sortition weight + slash exposure. */
|
|
16
|
+
staked: bigint;
|
|
17
|
+
activeDraws: number;
|
|
18
|
+
bump: number;
|
|
19
|
+
/** Leaf position in the Subaccord accumulator (assigned at first stake). */
|
|
20
|
+
treeIndex: number;
|
|
21
|
+
/**
|
|
22
|
+
* Net slash(-)/reward(+) accumulated from settlements, in `stake_token`.
|
|
23
|
+
* Written by settlement instead of mutating `staked` — keeps the
|
|
24
|
+
* accumulator root canonical. Folded into `staked` by the permissionless
|
|
25
|
+
* `reconcile_stake` crank (which updates the root via a Merkle proof).
|
|
26
|
+
*/
|
|
27
|
+
stakeDelta: bigint;
|
|
28
|
+
/**
|
|
29
|
+
* Pending slash exposure from all active draws. Incremented by
|
|
30
|
+
* `draw_seat` (by `α·min_stake` from the dispute's terms), decremented
|
|
31
|
+
* by settlement or cancel. Ensures the juror can always cover every
|
|
32
|
+
* concurrent slash. `staked - slash_reserve` is the truly free stake.
|
|
33
|
+
*/
|
|
34
|
+
slashReserve: bigint;
|
|
35
|
+
/**
|
|
36
|
+
* Timestamp of `request_withdraw` (0 = no pending request). The
|
|
37
|
+
* accumulator root is already updated at request time; `withdraw` just
|
|
38
|
+
* transfers tokens after `WITHDRAWAL_DELAY` + `active_draws == 0`.
|
|
39
|
+
*/
|
|
40
|
+
withdrawRequestedAt: bigint;
|
|
41
|
+
/**
|
|
42
|
+
* Tokens locked in the vault pending `withdraw`. Set at `request_withdraw`,
|
|
43
|
+
* consumed at `withdraw`.
|
|
44
|
+
*/
|
|
45
|
+
pendingWithdrawal: bigint;
|
|
46
|
+
/**
|
|
47
|
+
* Aggregate earned fees (`fee_token`, ADR-0020). Credited at
|
|
48
|
+
* `finalize_round` + settlement; withdrawn via the ungated
|
|
49
|
+
* `withdraw_fees` instruction. No `active_draws` gate (fees are earned,
|
|
50
|
+
* not at-risk capital).
|
|
51
|
+
*/
|
|
52
|
+
feesEarned: bigint;
|
|
53
|
+
/**
|
|
54
|
+
* Next free index in the free-slot linked list (RECLAIM-LEAF).
|
|
55
|
+
* `u32::MAX` = this account is NOT a free-list node (active juror, or never
|
|
56
|
+
* reclaimed). Any other value = this slot is reclaimed and `next_free` is
|
|
57
|
+
* the next free index after this one. Set by `reclaim_slot`, consumed by
|
|
58
|
+
* `stake`.
|
|
59
|
+
*/
|
|
60
|
+
nextFree: number;
|
|
61
|
+
/**
|
|
62
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
63
|
+
* must stay the last field — new fields are carved out of it without
|
|
64
|
+
* moving existing offsets or resizing the account.
|
|
65
|
+
*/
|
|
66
|
+
padding: ReadonlyUint8Array;
|
|
67
|
+
};
|
|
68
|
+
export type JurorStakeArgs = {
|
|
69
|
+
subaccord: Address;
|
|
70
|
+
juror: Address;
|
|
71
|
+
/** Collateral (stake_token). Sortition weight + slash exposure. */
|
|
72
|
+
staked: number | bigint;
|
|
73
|
+
activeDraws: number;
|
|
74
|
+
bump: number;
|
|
75
|
+
/** Leaf position in the Subaccord accumulator (assigned at first stake). */
|
|
76
|
+
treeIndex: number;
|
|
77
|
+
/**
|
|
78
|
+
* Net slash(-)/reward(+) accumulated from settlements, in `stake_token`.
|
|
79
|
+
* Written by settlement instead of mutating `staked` — keeps the
|
|
80
|
+
* accumulator root canonical. Folded into `staked` by the permissionless
|
|
81
|
+
* `reconcile_stake` crank (which updates the root via a Merkle proof).
|
|
82
|
+
*/
|
|
83
|
+
stakeDelta: number | bigint;
|
|
84
|
+
/**
|
|
85
|
+
* Pending slash exposure from all active draws. Incremented by
|
|
86
|
+
* `draw_seat` (by `α·min_stake` from the dispute's terms), decremented
|
|
87
|
+
* by settlement or cancel. Ensures the juror can always cover every
|
|
88
|
+
* concurrent slash. `staked - slash_reserve` is the truly free stake.
|
|
89
|
+
*/
|
|
90
|
+
slashReserve: number | bigint;
|
|
91
|
+
/**
|
|
92
|
+
* Timestamp of `request_withdraw` (0 = no pending request). The
|
|
93
|
+
* accumulator root is already updated at request time; `withdraw` just
|
|
94
|
+
* transfers tokens after `WITHDRAWAL_DELAY` + `active_draws == 0`.
|
|
95
|
+
*/
|
|
96
|
+
withdrawRequestedAt: number | bigint;
|
|
97
|
+
/**
|
|
98
|
+
* Tokens locked in the vault pending `withdraw`. Set at `request_withdraw`,
|
|
99
|
+
* consumed at `withdraw`.
|
|
100
|
+
*/
|
|
101
|
+
pendingWithdrawal: number | bigint;
|
|
102
|
+
/**
|
|
103
|
+
* Aggregate earned fees (`fee_token`, ADR-0020). Credited at
|
|
104
|
+
* `finalize_round` + settlement; withdrawn via the ungated
|
|
105
|
+
* `withdraw_fees` instruction. No `active_draws` gate (fees are earned,
|
|
106
|
+
* not at-risk capital).
|
|
107
|
+
*/
|
|
108
|
+
feesEarned: number | bigint;
|
|
109
|
+
/**
|
|
110
|
+
* Next free index in the free-slot linked list (RECLAIM-LEAF).
|
|
111
|
+
* `u32::MAX` = this account is NOT a free-list node (active juror, or never
|
|
112
|
+
* reclaimed). Any other value = this slot is reclaimed and `next_free` is
|
|
113
|
+
* the next free index after this one. Set by `reclaim_slot`, consumed by
|
|
114
|
+
* `stake`.
|
|
115
|
+
*/
|
|
116
|
+
nextFree: number;
|
|
117
|
+
/**
|
|
118
|
+
* Reserved tail space for future field extensions. Zeroed at `init`;
|
|
119
|
+
* must stay the last field — new fields are carved out of it without
|
|
120
|
+
* moving existing offsets or resizing the account.
|
|
121
|
+
*/
|
|
122
|
+
padding: ReadonlyUint8Array;
|
|
123
|
+
};
|
|
124
|
+
/** Gets the encoder for {@link JurorStakeArgs} account data. */
|
|
125
|
+
export declare function getJurorStakeEncoder(): FixedSizeEncoder<JurorStakeArgs>;
|
|
126
|
+
/** Gets the decoder for {@link JurorStake} account data. */
|
|
127
|
+
export declare function getJurorStakeDecoder(): FixedSizeDecoder<JurorStake>;
|
|
128
|
+
/** Gets the codec for {@link JurorStake} account data. */
|
|
129
|
+
export declare function getJurorStakeCodec(): FixedSizeCodec<JurorStakeArgs, JurorStake>;
|
|
130
|
+
export declare function decodeJurorStake<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<JurorStake, TAddress>;
|
|
131
|
+
export declare function decodeJurorStake<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<JurorStake, TAddress>;
|
|
132
|
+
export declare function fetchJurorStake<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<JurorStake, TAddress>>;
|
|
133
|
+
export declare function fetchMaybeJurorStake<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<JurorStake, TAddress>>;
|
|
134
|
+
export declare function fetchAllJurorStake(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<JurorStake>[]>;
|
|
135
|
+
export declare function fetchAllMaybeJurorStake(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<JurorStake>[]>;
|
|
136
|
+
export declare function getJurorStakeSize(): number;
|
|
137
|
+
//# sourceMappingURL=jurorStake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jurorStake.d.ts","sourceRoot":"","sources":["../../../src/generated/accounts/jurorStake.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,EAkBpB,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,yBAAyB,EAAE,kBAEtC,CAAC;AAEH,wBAAgB,+BAA+B,IAAI,kBAAkB,CAEpE;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,aAAa,EAAE,kBAAkB,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAA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