@intent-engine/core 0.1.22 → 0.1.26

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 (54) hide show
  1. package/dist/src/admin-builders.d.ts +49 -0
  2. package/dist/src/admin-builders.js +52 -0
  3. package/dist/src/admin-builders.js.map +1 -0
  4. package/dist/src/bounty.d.ts +3 -1
  5. package/dist/src/bounty.js +6 -2
  6. package/dist/src/bounty.js.map +1 -1
  7. package/dist/src/builder-accounts.d.ts +62 -0
  8. package/dist/src/builder-accounts.js +64 -0
  9. package/dist/src/builder-accounts.js.map +1 -0
  10. package/dist/src/builders.d.ts +5 -213
  11. package/dist/src/builders.js +5 -493
  12. package/dist/src/builders.js.map +1 -1
  13. package/dist/src/describe.d.ts +5 -1
  14. package/dist/src/describe.js +22 -3
  15. package/dist/src/describe.js.map +1 -1
  16. package/dist/src/errors.d.ts +2 -1
  17. package/dist/src/errors.js +39 -0
  18. package/dist/src/errors.js.map +1 -1
  19. package/dist/src/fee.d.ts +1 -0
  20. package/dist/src/fee.js +13 -5
  21. package/dist/src/fee.js.map +1 -1
  22. package/dist/src/fill-builders.d.ts +51 -0
  23. package/dist/src/fill-builders.js +167 -0
  24. package/dist/src/fill-builders.js.map +1 -0
  25. package/dist/src/index.d.ts +2 -0
  26. package/dist/src/index.js +2 -0
  27. package/dist/src/index.js.map +1 -1
  28. package/dist/src/intent-builders.d.ts +61 -0
  29. package/dist/src/intent-builders.js +152 -0
  30. package/dist/src/intent-builders.js.map +1 -0
  31. package/dist/src/mandate.js +2 -2
  32. package/dist/src/mandate.js.map +1 -1
  33. package/dist/src/manifest.d.ts +5 -0
  34. package/dist/src/manifest.js +43 -0
  35. package/dist/src/manifest.js.map +1 -0
  36. package/dist/src/math.d.ts +1 -0
  37. package/dist/src/math.js +9 -0
  38. package/dist/src/math.js.map +1 -1
  39. package/dist/src/memo.d.ts +24 -0
  40. package/dist/src/memo.js +94 -0
  41. package/dist/src/memo.js.map +1 -0
  42. package/dist/src/owner-builders.d.ts +52 -0
  43. package/dist/src/owner-builders.js +83 -0
  44. package/dist/src/owner-builders.js.map +1 -0
  45. package/dist/src/sig.d.ts +1 -0
  46. package/dist/src/sig.js +4 -0
  47. package/dist/src/sig.js.map +1 -1
  48. package/dist/src/validate.d.ts +2 -0
  49. package/dist/src/validate.js +15 -0
  50. package/dist/src/validate.js.map +1 -1
  51. package/package.json +17 -4
  52. package/dist/generated/client/types/configSettings.d.ts +0 -25
  53. package/dist/generated/client/types/configSettings.js +0 -30
  54. package/dist/generated/client/types/configSettings.js.map +0 -1
@@ -0,0 +1,49 @@
1
+ import { type Address, type TransactionSigner } from "@solana/kit";
2
+ export declare const UPGRADEABLE_LOADER_ADDRESS: Address<"BPFLoaderUpgradeab1e11111111111111111111111">;
3
+ export declare function findProgramDataAddress(program?: Address): Promise<Address>;
4
+ export declare function buildInitConfig(input: {
5
+ authority: TransactionSigner;
6
+ domain: Uint8Array;
7
+ guardian: Address;
8
+ feeRecipient: Address;
9
+ enabledKinds: bigint;
10
+ feeBps: number;
11
+ paused: number;
12
+ }): Promise<import("../generated/client/index.js").InitConfigInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
13
+ export declare function buildRaisePause(input: {
14
+ authority: TransactionSigner;
15
+ flags: number;
16
+ }): Promise<import("../generated/client/index.js").RaisePauseInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
17
+ export declare function buildLowerPause(input: {
18
+ admin: TransactionSigner;
19
+ flags: number;
20
+ }): Promise<import("../generated/client/index.js").LowerPauseInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
21
+ export type ConfigUpdateSpec = {
22
+ guardian: Address;
23
+ feeRecipient: Address;
24
+ enabledKinds: bigint;
25
+ feeBps: number;
26
+ fillDisabledKinds: bigint;
27
+ };
28
+ export declare function buildUpdateConfig(input: {
29
+ admin: TransactionSigner;
30
+ update: ConfigUpdateSpec;
31
+ }): Promise<import("../generated/client/index.js").UpdateConfigInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
32
+ export declare function buildProposeAdmin(input: {
33
+ admin: TransactionSigner;
34
+ pendingAdmin: Address;
35
+ }): Promise<import("../generated/client/index.js").ProposeAdminInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
36
+ export declare function buildAcceptAdmin(input: {
37
+ pendingAdmin: TransactionSigner;
38
+ }): Promise<import("../generated/client/index.js").AcceptAdminInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
39
+ export type EconomicsSpec = {
40
+ kindFeeMask: number;
41
+ kindFeeBps: readonly [number, number, number, number];
42
+ partnerCutBps: number;
43
+ crankBounty: number;
44
+ createFee: number;
45
+ };
46
+ export declare function buildUpdateEconomics(input: {
47
+ admin: TransactionSigner;
48
+ economics: EconomicsSpec;
49
+ }): Promise<import("../generated/client/index.js").UpdateEconomicsInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
@@ -0,0 +1,52 @@
1
+ import { getAddressEncoder, getProgramDerivedAddress } from "@solana/kit";
2
+ import { getInitConfigInstructionAsync, getLowerPauseInstruction, getProposeAdminInstruction, getAcceptAdminInstruction, getUpdateConfigInstruction, getRaisePauseInstruction, getUpdateEconomicsInstruction, INTENT_ENGINE_PROGRAM_ADDRESS, } from "../generated/client/index.js";
3
+ import { events } from "./builder-accounts.js";
4
+ export const UPGRADEABLE_LOADER_ADDRESS = "BPFLoaderUpgradeab1e11111111111111111111111";
5
+ export async function findProgramDataAddress(program = INTENT_ENGINE_PROGRAM_ADDRESS) {
6
+ const [address] = await getProgramDerivedAddress({
7
+ programAddress: UPGRADEABLE_LOADER_ADDRESS,
8
+ seeds: [getAddressEncoder().encode(program)],
9
+ });
10
+ return address;
11
+ }
12
+ export async function buildInitConfig(input) {
13
+ return getInitConfigInstructionAsync({
14
+ authority: input.authority,
15
+ programData: await findProgramDataAddress(),
16
+ domain: input.domain,
17
+ guardian: input.guardian,
18
+ feeRecipient: input.feeRecipient,
19
+ enabledKinds: input.enabledKinds,
20
+ feeBps: input.feeBps,
21
+ paused: input.paused,
22
+ ...(await events()),
23
+ });
24
+ }
25
+ export async function buildRaisePause(input) {
26
+ return getRaisePauseInstruction({ authority: input.authority, flags: input.flags, ...(await events()) });
27
+ }
28
+ export async function buildLowerPause(input) {
29
+ return getLowerPauseInstruction({ admin: input.admin, flags: input.flags, ...(await events()) });
30
+ }
31
+ export async function buildUpdateConfig(input) {
32
+ return getUpdateConfigInstruction({ admin: input.admin, ...input.update, ...(await events()) });
33
+ }
34
+ export async function buildProposeAdmin(input) {
35
+ return getProposeAdminInstruction({ admin: input.admin, pendingAdmin: input.pendingAdmin, ...(await events()) });
36
+ }
37
+ export async function buildAcceptAdmin(input) {
38
+ return getAcceptAdminInstruction({ pendingAdmin: input.pendingAdmin, ...(await events()) });
39
+ }
40
+ export async function buildUpdateEconomics(input) {
41
+ const e = input.economics;
42
+ return getUpdateEconomicsInstruction({
43
+ admin: input.admin,
44
+ kindFeeMask: e.kindFeeMask,
45
+ kindFeeBps: [...e.kindFeeBps],
46
+ partnerCutBps: e.partnerCutBps,
47
+ crankBounty: e.crankBounty,
48
+ createFee: e.createFee,
49
+ ...(await events()),
50
+ });
51
+ }
52
+ //# sourceMappingURL=admin-builders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-builders.js","sourceRoot":"","sources":["../../src/admin-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAE,wBAAwB,EAA0B,MAAM,aAAa,CAAC;AAChH,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,CAAC,MAAM,0BAA0B,GACrC,6CAAuG,CAAC;AAE1G,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,OAAO,GAAY,6BAA6B;IAC3F,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,wBAAwB,CAAC;QAC/C,cAAc,EAAE,0BAA0B;QAC1C,KAAK,EAAE,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;KAC7C,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAQrC;IACC,OAAO,6BAA6B,CAAC;QACnC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,WAAW,EAAE,MAAM,sBAAsB,EAAE;QAC3C,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM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CAAC;IAC1B,OAAO,6BAA6B,CAAC;QACnC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;QAC7B,aAAa,EAAE,CAAC,CAAC,aAAa;QAC9B,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,GAAG,CAAC,MAAM,MAAM,EAAE,CAAC;KACpB,CAAC,CAAC;AACL,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export declare const MAX_RECIPIENTS = 16;
2
- export declare function splitN(amount: bigint, weightsBps: readonly number[]): bigint[];
2
+ export declare const MAX_SPLIT_RECIPIENTS = 8;
3
+ export declare function splitPayout(amount: bigint, weightsBps: readonly number[]): bigint[];
4
+ export declare function splitN(amount: bigint, weightsBps: readonly number[], maxRecipients?: number): bigint[];
@@ -2,9 +2,13 @@ import { IntentCoreError } from "./errors.js";
2
2
  import { BPS_DENOMINATOR } from "./fee.js";
3
3
  import { mulDivFloor, U64_MAX } from "./math.js";
4
4
  export const MAX_RECIPIENTS = 16;
5
- export function splitN(amount, weightsBps) {
5
+ export const MAX_SPLIT_RECIPIENTS = 8;
6
+ export function splitPayout(amount, weightsBps) {
7
+ return splitN(amount, weightsBps, MAX_SPLIT_RECIPIENTS);
8
+ }
9
+ export function splitN(amount, weightsBps, maxRecipients = MAX_RECIPIENTS) {
6
10
  const len = weightsBps.length;
7
- if (len === 0 || len > MAX_RECIPIENTS) {
11
+ if (len === 0 || len > Math.min(maxRecipients, MAX_RECIPIENTS)) {
8
12
  throw new IntentCoreError("InvalidParams");
9
13
  }
10
14
  let sum = 0n;
@@ -1 +1 @@
1
- {"version":3,"file":"bounty.js","sourceRoot":"","sources":["../../src/bounty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE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AC,CAAC;IAC7C,CAAC;IACD,OAAO,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;IAC/B,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { Address } from "@solana/kit";
2
+ import { type Partner } from "./ext.js";
3
+ import { type IntentParams } from "./kinds.js";
4
+ export declare const INSTRUCTIONS_SYSVAR_ADDRESS: Address<"Sysvar1nstructions1111111111111111111111111">;
5
+ export declare function events(): Promise<{
6
+ eventAuthority: Address<string>;
7
+ program: Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">;
8
+ }>;
9
+ export declare const fillExt: (ext?: Uint8Array) => Uint8Array<ArrayBufferLike>;
10
+ export declare const settleExt: (ext?: Uint8Array) => Uint8Array<ArrayBufferLike>;
11
+ export declare function createExt(input: {
12
+ ext?: Uint8Array;
13
+ partner?: Partner;
14
+ }): Uint8Array;
15
+ export declare function createArgs(input: {
16
+ nonce: bigint;
17
+ params: IntentParams;
18
+ expiresAt: bigint;
19
+ flags?: number;
20
+ ext?: Uint8Array;
21
+ partner?: Partner;
22
+ maxCreateFee: number;
23
+ maxBounty: number;
24
+ }): {
25
+ nonce: bigint;
26
+ kind: import("./kinds.js").Kind;
27
+ flags: number;
28
+ params: Uint8Array<ArrayBufferLike>;
29
+ expiresAt: bigint;
30
+ ext: Uint8Array<ArrayBufferLike>;
31
+ maxCreateFee: number;
32
+ maxBounty: number;
33
+ };
34
+ export declare function partnerAccount(input: {
35
+ partner?: Address;
36
+ inputMint: Address;
37
+ inputTokenProgram: Address;
38
+ }): Promise<{
39
+ partnerTo?: never;
40
+ } | {
41
+ partnerTo: Address;
42
+ }>;
43
+ export declare function mandateAccounts(input: {
44
+ mandate?: Address;
45
+ owner: Address;
46
+ }): Promise<{
47
+ mandate?: never;
48
+ ownerState?: never;
49
+ } | {
50
+ mandate: Address;
51
+ ownerState: Address<string>;
52
+ }>;
53
+ export declare function agentAccount(input: {
54
+ agent?: Address;
55
+ inputMint: Address;
56
+ inputTokenProgram: Address;
57
+ }): Promise<{
58
+ agentTo?: never;
59
+ } | {
60
+ agentTo: Address;
61
+ }>;
62
+ export declare function intentOf(owner: Address, nonce: bigint): Promise<Address>;
@@ -0,0 +1,64 @@
1
+ import { findUserStatePda, INTENT_ENGINE_PROGRAM_ADDRESS } from "../generated/client/index.js";
2
+ import { checkFlags, encodePartner, FILL_EXT_TAGS, partnerOf, SETTLE_EXT_TAGS, validateExt, } from "./ext.js";
3
+ import { encodeParams, validate } from "./kinds.js";
4
+ import { NO_MANDATE } from "./mandate.js";
5
+ import { findAssociatedTokenAddress, findEventAuthorityPda, findIntentPda } from "./pdas.js";
6
+ export const INSTRUCTIONS_SYSVAR_ADDRESS = "Sysvar1nstructions1111111111111111111111111";
7
+ export async function events() {
8
+ const [eventAuthority] = await findEventAuthorityPda();
9
+ return { eventAuthority, program: INTENT_ENGINE_PROGRAM_ADDRESS };
10
+ }
11
+ export const fillExt = (ext) => validateExt(ext ?? new Uint8Array(), FILL_EXT_TAGS);
12
+ export const settleExt = (ext) => validateExt(ext ?? new Uint8Array(), SETTLE_EXT_TAGS);
13
+ export function createExt(input) {
14
+ if (input.ext !== undefined && input.partner !== undefined) {
15
+ throw new RangeError("pass either raw extension bytes or a partner, not both");
16
+ }
17
+ const ext = input.ext ?? (input.partner === undefined ? new Uint8Array() : encodePartner(input.partner));
18
+ partnerOf(ext);
19
+ return ext;
20
+ }
21
+ export function createArgs(input) {
22
+ const params = validate(input.params);
23
+ return {
24
+ nonce: input.nonce,
25
+ kind: params.kind,
26
+ flags: checkFlags(input.flags ?? 0),
27
+ params: encodeParams(params),
28
+ expiresAt: input.expiresAt,
29
+ ext: createExt(input),
30
+ maxCreateFee: input.maxCreateFee,
31
+ maxBounty: input.maxBounty,
32
+ };
33
+ }
34
+ export async function partnerAccount(input) {
35
+ return input.partner === undefined
36
+ ? {}
37
+ : {
38
+ partnerTo: await findAssociatedTokenAddress({
39
+ owner: input.partner,
40
+ mint: input.inputMint,
41
+ tokenProgram: input.inputTokenProgram,
42
+ }),
43
+ };
44
+ }
45
+ export async function mandateAccounts(input) {
46
+ return input.mandate === undefined || input.mandate === NO_MANDATE
47
+ ? {}
48
+ : { mandate: input.mandate, ownerState: (await findUserStatePda({ owner: input.owner }))[0] };
49
+ }
50
+ export async function agentAccount(input) {
51
+ return input.agent === undefined
52
+ ? {}
53
+ : {
54
+ agentTo: await findAssociatedTokenAddress({
55
+ owner: input.agent,
56
+ mint: input.inputMint,
57
+ tokenProgram: input.inputTokenProgram,
58
+ }),
59
+ };
60
+ }
61
+ export async function intentOf(owner, nonce) {
62
+ return (await findIntentPda({ owner, nonce }))[0];
63
+ }
64
+ //# sourceMappingURL=builder-accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder-accounts.js","sourceRoot":"","sources":["../../src/builder-accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EAEb,SAAS,EACT,eAAe,EACf,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAqB,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE7F,MAAM,CAAC,MAAM,2BAA2B,GACtC,6CAAuG,CAAC;AAE1G,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,qBAAqB,EAAE,CAAC;IACvD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAgB,EAAE,EAAE,CAAC,WAAW,C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CAAC,CAAC;YACE,SAAS,EAAE,MAAM,0BAA0B,CAAC;gBAC1C,KAAK,EAAE,KAAK,CAAC,OAAO;gBACpB,IAAI,EAAE,KAAK,CAAC,SAAS;gBACrB,YAAY,EAAE,KAAK,CAAC,iBAAiB;aACtC,CAAC;SACH,CAAC;AACR,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAA4C;IAChF,OAAO,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,KAAK,UAAU;QAChE,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAClG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,KAA0E;IAC3G,OAAO,KAAK,CAAC,KAAK,KAAK,SAAS;QAC9B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC;YACE,OAAO,EAAE,MAAM,0BAA0B,CAAC;gBACxC,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,KAAK,CAAC,SAAS;gBACrB,YAAY,EAAE,KAAK,CAAC,iBAAiB;aACtC,CAAC;SACH,CAAC;AACR,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,KAAc,EAAE,KAAa;IAC1D,OAAO,CAAC,MAAM,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC"}
@@ -1,213 +1,5 @@
1
- import { type Address, type Instruction, type TransactionSigner } from "@solana/kit";
2
- import { type Partner } from "./ext.js";
3
- import { type IntentParams } from "./kinds.js";
4
- import { type MandateSpec } from "./mandate.js";
5
- export declare const INSTRUCTIONS_SYSVAR_ADDRESS: Address<"Sysvar1nstructions1111111111111111111111111">;
6
- export declare function createExt(input: {
7
- ext?: Uint8Array;
8
- partner?: Partner;
9
- }): Uint8Array;
10
- export declare const UPGRADEABLE_LOADER_ADDRESS: Address<"BPFLoaderUpgradeab1e11111111111111111111111">;
11
- export declare function findProgramDataAddress(program?: Address): Promise<Address>;
12
- export declare function buildInitConfig(input: {
13
- authority: TransactionSigner;
14
- domain: Uint8Array;
15
- guardian: Address;
16
- feeRecipient: Address;
17
- enabledKinds: bigint;
18
- feeBps: number;
19
- paused: number;
20
- }): Promise<import("../generated/client/index.js").InitConfigInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
21
- export declare function buildRaisePause(input: {
22
- authority: TransactionSigner;
23
- flags: number;
24
- }): Promise<import("../generated/client/index.js").RaisePauseInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
25
- export declare function buildLowerPause(input: {
26
- admin: TransactionSigner;
27
- flags: number;
28
- }): Promise<import("../generated/client/index.js").LowerPauseInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
29
- export type ConfigUpdateSpec = {
30
- guardian: Address;
31
- feeRecipient: Address;
32
- enabledKinds: bigint;
33
- feeBps: number;
34
- fillDisabledKinds: bigint;
35
- };
36
- export declare function buildUpdateConfig(input: {
37
- admin: TransactionSigner;
38
- update: ConfigUpdateSpec;
39
- }): Promise<import("../generated/client/index.js").UpdateConfigInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
40
- export declare function buildProposeAdmin(input: {
41
- admin: TransactionSigner;
42
- pendingAdmin: Address;
43
- }): Promise<import("../generated/client/index.js").ProposeAdminInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
44
- export declare function buildAcceptAdmin(input: {
45
- pendingAdmin: TransactionSigner;
46
- }): Promise<import("../generated/client/index.js").AcceptAdminInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
47
- export type EconomicsSpec = {
48
- kindFeeMask: number;
49
- kindFeeBps: readonly [number, number, number, number];
50
- partnerCutBps: number;
51
- crankBounty: number;
52
- createFee: number;
53
- };
54
- export declare function buildUpdateEconomics(input: {
55
- admin: TransactionSigner;
56
- economics: EconomicsSpec;
57
- }): Promise<import("../generated/client/index.js").UpdateEconomicsInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
58
- export declare function buildInitUser(input: {
59
- owner: TransactionSigner;
60
- }): Promise<import("../generated/client/index.js").InitUserInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
61
- export declare function buildAdvanceNonce(input: {
62
- owner: TransactionSigner;
63
- nonceBase: bigint;
64
- }): Promise<import("../generated/client/index.js").AdvanceNonceInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
65
- export declare const EPOCH_JUMP_BITS = 48n;
66
- export declare const MAX_EPOCH_JUMP: bigint;
67
- export declare const MAX_NONCE_JUMP: bigint;
68
- export declare const NONCE_CEILING: bigint;
69
- export declare function nextEpoch(current: bigint, entropy?: Uint8Array): bigint;
70
- export declare function buildAdvanceEpoch(input: {
71
- owner: TransactionSigner;
72
- epoch: bigint;
73
- }): Promise<import("../generated/client/index.js").AdvanceEpochInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
74
- export type CreateIntentSpec = {
75
- owner: TransactionSigner;
76
- treasury: Address;
77
- maxCreateFee: number;
78
- maxBounty: number;
79
- nonce: bigint;
80
- params: IntentParams;
81
- expiresAt: bigint;
82
- flags?: number;
83
- ext?: Uint8Array;
84
- partner?: Partner;
85
- inputMint: Address;
86
- outputMint: Address;
87
- inputTokenProgram: Address;
88
- outputTokenProgram: Address;
89
- ownerInput?: Address;
90
- receiver?: Address;
91
- receiverAuthority?: Address;
92
- };
93
- export declare function buildCreateIntent(input: CreateIntentSpec): Promise<import("../generated/client/index.js").CreateIntentInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
94
- type IntentRef = {
95
- owner: Address;
96
- nonce: bigint;
97
- inputMint: Address;
98
- tokenProgram: Address;
99
- };
100
- export declare function buildCancelIntent(input: Omit<IntentRef, "owner"> & {
101
- owner: TransactionSigner;
102
- refundTo?: Address;
103
- ext?: Uint8Array;
104
- }): Promise<import("../generated/client/index.js").CancelIntentInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
105
- export declare function buildExpireIntent(input: IntentRef & {
106
- cranker: TransactionSigner;
107
- refundTo?: Address;
108
- ext?: Uint8Array;
109
- }): Promise<import("../generated/client/index.js").ExpireIntentInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
110
- export declare function buildCloseIntent(input: IntentRef & {
111
- cranker: TransactionSigner;
112
- rentPayer?: Address;
113
- refundTo?: Address;
114
- ext?: Uint8Array;
115
- }): Promise<import("../generated/client/index.js").CloseIntentInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
116
- export type FillIntentSpec = {
117
- solver: TransactionSigner;
118
- owner: Address;
119
- nonce: bigint;
120
- inputMint: Address;
121
- outputMint: Address;
122
- inputTokenProgram: Address;
123
- outputTokenProgram: Address;
124
- receiver: Address;
125
- solverOutput: Address;
126
- solverInput: Address;
127
- feeRecipient?: Address;
128
- partner?: Address;
129
- mandate?: Address;
130
- agent?: Address;
131
- amountIn: bigint;
132
- amountOut: bigint;
133
- maxFeeBps: number;
134
- ext?: Uint8Array;
135
- };
136
- export declare function buildFillIntent(input: FillIntentSpec): Promise<import("../generated/client/index.js").FillIntentInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
137
- export type CreateIntentSignedSpec = Omit<CreateIntentSpec, "owner"> & {
138
- payer: TransactionSigner;
139
- owner: Address;
140
- submitBy: bigint;
141
- relayerFee?: bigint;
142
- relayerFeeAccount?: Address;
143
- };
144
- export declare function buildCreateIntentSigned(input: CreateIntentSignedSpec): Promise<import("../generated/client/index.js").CreateIntentSignedInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "Sysvar1nstructions1111111111111111111111111", string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
145
- export declare function buildApproveDelegate(input: {
146
- owner: TransactionSigner;
147
- mint: Address;
148
- tokenProgram: Address;
149
- amount: bigint;
150
- decimals: number;
151
- source?: Address;
152
- }): Promise<import("@solana-program/token").ApproveCheckedInstruction<Address, string, string, string, string, []>>;
153
- export declare function buildApproveForIntent(input: {
154
- owner: TransactionSigner;
155
- mint: Address;
156
- tokenProgram: Address;
157
- decimals: number;
158
- params: IntentParams;
159
- source?: Address;
160
- }): Promise<import("@solana-program/token").ApproveCheckedInstruction<Address, string, string, string, string, []>>;
161
- export type FillAttestedSpec = {
162
- solver: TransactionSigner;
163
- owner: Address;
164
- nonce: bigint;
165
- inputMint: Address;
166
- inputTokenProgram: Address;
167
- payee: Address;
168
- feeRecipient?: Address;
169
- partner?: Address;
170
- judge?: Address;
171
- amountIn: bigint;
172
- result: bigint;
173
- maxFeeBps: number;
174
- ext?: Uint8Array;
175
- };
176
- export declare function buildFillAttested(input: FillAttestedSpec): Promise<import("../generated/client/index.js").FillAttestedInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, "Sysvar1nstructions1111111111111111111111111", string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
177
- export declare const MAX_SPLIT_RECIPIENTS = 8;
178
- export type FillAttestedSplitSpec = Omit<FillAttestedSpec, "payee"> & {
179
- recipients: Address[];
180
- weights: number[];
181
- };
182
- export declare function buildFillAttestedSplit(input: FillAttestedSplitSpec): Promise<import("../generated/client/index.js").FillAttestedSplitInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "Sysvar1nstructions1111111111111111111111111", string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
183
- export type FlashFillSpec = Omit<FillIntentSpec, "ext"> & {
184
- beginExt?: Uint8Array;
185
- endExt?: Uint8Array;
186
- baseIndex?: number;
187
- prefix?: Instruction[];
188
- route?: Instruction[];
189
- };
190
- export declare function buildFlashFill(input: FlashFillSpec): Promise<Instruction[]>;
191
- export declare function buildCreateMandate(input: {
192
- owner: TransactionSigner;
193
- inputMint: Address;
194
- outputMint: Address;
195
- inputTokenProgram: Address;
196
- outputTokenProgram: Address;
197
- mandate: MandateSpec;
198
- ownerInput?: Address;
199
- receiver?: Address;
200
- }): Promise<import("../generated/client/index.js").CreateMandateInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
201
- export declare function buildRevokeMandate(input: {
202
- owner: TransactionSigner;
203
- agent: Address;
204
- id: bigint;
205
- }): Promise<import("../generated/client/index.js").RevokeMandateInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
206
- export type CreateIntentByAgentSpec = Omit<CreateIntentSpec, "owner" | "treasury" | "receiverAuthority"> & {
207
- agent: TransactionSigner;
208
- owner: Address;
209
- mandateId: bigint;
210
- treasury: Address;
211
- };
212
- export declare function buildCreateIntentByAgent(input: CreateIntentByAgentSpec): Promise<import("../generated/client/index.js").CreateIntentByAgentInstruction<Address<"GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU">, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "GHFB9q4fhhqRyCoycoivdxMhFkp1aLHJk5VvroUsgrJU", []>>;
213
- export {};
1
+ export { createExt, INSTRUCTIONS_SYSVAR_ADDRESS } from "./builder-accounts.js";
2
+ export { buildAcceptAdmin, buildInitConfig, buildLowerPause, buildProposeAdmin, buildRaisePause, buildUpdateConfig, buildUpdateEconomics, type ConfigUpdateSpec, type EconomicsSpec, findProgramDataAddress, UPGRADEABLE_LOADER_ADDRESS, } from "./admin-builders.js";
3
+ export { buildAdvanceEpoch, buildAdvanceNonce, buildApproveDelegate, buildApproveForIntent, buildCreateMandate, buildInitUser, buildRevokeMandate, EPOCH_JUMP_BITS, MAX_EPOCH_JUMP, MAX_NONCE_JUMP, nextEpoch, NONCE_CEILING, } from "./owner-builders.js";
4
+ export { buildCancelIntent, buildCloseIntent, buildCreateIntent, buildCreateIntentByAgent, buildCreateIntentSigned, buildExpireIntent, type CreateIntentByAgentSpec, type CreateIntentSignedSpec, type CreateIntentSpec, } from "./intent-builders.js";
5
+ export { buildFillAttested, buildFillAttestedSplit, buildFillIntent, buildFlashFill, type FillAttestedSpec, type FillAttestedSplitSpec, type FillIntentSpec, type FlashFillSpec, } from "./fill-builders.js";