@sinai-standard/types 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/dist/index.d.ts +103 -0
- package/dist/index.js +30 -0
- package/package.json +19 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { PublicKey } from "@solana/web3.js";
|
|
2
|
+
export type AllowlistMode = "allowlist" | "denylist";
|
|
3
|
+
export declare const PROGRAM_IDS: {
|
|
4
|
+
readonly allowlistHook: PublicKey;
|
|
5
|
+
readonly taxHook: PublicKey;
|
|
6
|
+
readonly holdHook: PublicKey;
|
|
7
|
+
readonly routerHook: PublicKey;
|
|
8
|
+
readonly tokenFactory: PublicKey;
|
|
9
|
+
readonly maxBalanceHook: PublicKey;
|
|
10
|
+
};
|
|
11
|
+
export declare const SEEDS: {
|
|
12
|
+
readonly allowlist: Buffer<ArrayBuffer>;
|
|
13
|
+
readonly taxConfig: Buffer<ArrayBuffer>;
|
|
14
|
+
readonly taxDelegate: Buffer<ArrayBuffer>;
|
|
15
|
+
readonly holdConfig: Buffer<ArrayBuffer>;
|
|
16
|
+
readonly walletLock: Buffer<ArrayBuffer>;
|
|
17
|
+
readonly routerConfig: Buffer<ArrayBuffer>;
|
|
18
|
+
readonly extraAccountMetas: Buffer<ArrayBuffer>;
|
|
19
|
+
readonly maxBalanceConfig: Buffer<ArrayBuffer>;
|
|
20
|
+
readonly tokenRecord: Buffer<ArrayBuffer>;
|
|
21
|
+
readonly freezeAuthority: Buffer<ArrayBuffer>;
|
|
22
|
+
};
|
|
23
|
+
export interface TokenCreateParams {
|
|
24
|
+
name: string;
|
|
25
|
+
symbol: string;
|
|
26
|
+
uri?: string;
|
|
27
|
+
decimals: number;
|
|
28
|
+
supply: bigint | number;
|
|
29
|
+
hooks?: {
|
|
30
|
+
allowlist?: {
|
|
31
|
+
mode: AllowlistMode;
|
|
32
|
+
};
|
|
33
|
+
tax?: {
|
|
34
|
+
bps: number;
|
|
35
|
+
maxBps: number;
|
|
36
|
+
vault: PublicKey;
|
|
37
|
+
};
|
|
38
|
+
holdPeriod?: {
|
|
39
|
+
seconds: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface AllowlistRegistryData {
|
|
44
|
+
authority: PublicKey;
|
|
45
|
+
mint: PublicKey;
|
|
46
|
+
isActive: boolean;
|
|
47
|
+
mode: AllowlistMode;
|
|
48
|
+
walletCount: number;
|
|
49
|
+
wallets: PublicKey[];
|
|
50
|
+
}
|
|
51
|
+
export interface TaxConfigData {
|
|
52
|
+
authority: PublicKey;
|
|
53
|
+
mint: PublicKey;
|
|
54
|
+
taxVault: PublicKey;
|
|
55
|
+
taxBps: number;
|
|
56
|
+
maxTaxBps: number;
|
|
57
|
+
isActive: boolean;
|
|
58
|
+
exemptCount: number;
|
|
59
|
+
exemptWallets: PublicKey[];
|
|
60
|
+
}
|
|
61
|
+
export interface HoldConfigData {
|
|
62
|
+
authority: PublicKey;
|
|
63
|
+
mint: PublicKey;
|
|
64
|
+
holdPeriodSeconds: number;
|
|
65
|
+
isActive: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface WalletLockData {
|
|
68
|
+
wallet: PublicKey;
|
|
69
|
+
mint: PublicKey;
|
|
70
|
+
acquiredAt: number;
|
|
71
|
+
unlockAt: number;
|
|
72
|
+
}
|
|
73
|
+
export interface RouterConfigData {
|
|
74
|
+
authority: PublicKey;
|
|
75
|
+
mint: PublicKey;
|
|
76
|
+
isActive: boolean;
|
|
77
|
+
allowlistHookProgram: PublicKey;
|
|
78
|
+
taxHookProgram: PublicKey;
|
|
79
|
+
holdHookProgram: PublicKey;
|
|
80
|
+
maxBalanceHookProgram: PublicKey;
|
|
81
|
+
}
|
|
82
|
+
export interface MaxBalanceConfigData {
|
|
83
|
+
authority: PublicKey;
|
|
84
|
+
mint: PublicKey;
|
|
85
|
+
maxBalance: bigint;
|
|
86
|
+
isActive: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface TokenRecordData {
|
|
89
|
+
issuer: PublicKey;
|
|
90
|
+
mint: PublicKey;
|
|
91
|
+
allowlistEnabled: boolean;
|
|
92
|
+
taxEnabled: boolean;
|
|
93
|
+
holdPeriodEnabled: boolean;
|
|
94
|
+
hookProgram: PublicKey;
|
|
95
|
+
createdAt: number;
|
|
96
|
+
freezeEnabled: boolean;
|
|
97
|
+
pausableEnabled: boolean;
|
|
98
|
+
paused: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface ConfidentialTransferConfig {
|
|
101
|
+
autoApproveNewAccounts: boolean;
|
|
102
|
+
auditorElGamalPubkey?: Uint8Array;
|
|
103
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEEDS = exports.PROGRAM_IDS = void 0;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Program IDs
|
|
7
|
+
// ============================================================================
|
|
8
|
+
exports.PROGRAM_IDS = {
|
|
9
|
+
allowlistHook: new web3_js_1.PublicKey("Bo3Rd8qZeuxU1cmtCqKEFPRe5Uumx9tusjZ7B1hXtPgc"),
|
|
10
|
+
taxHook: new web3_js_1.PublicKey("ACJXvcH4uaBfBwSwcVG48zJ177ydEvtCqGRMKXv53goZ"),
|
|
11
|
+
holdHook: new web3_js_1.PublicKey("8HkukxWoo27BnNwqCzCim4ueKaGEfqLW4LdSZkHkCWzS"),
|
|
12
|
+
routerHook: new web3_js_1.PublicKey("HHnt7Hfnp2fDftFNCFPqEhebgXGizuqubXqhiEi8C1of"),
|
|
13
|
+
tokenFactory: new web3_js_1.PublicKey("VXQL8u4NVUYG1zaejujwh5gr21iinmk4yYCXn1g9TXr"),
|
|
14
|
+
maxBalanceHook: new web3_js_1.PublicKey("Ctx9ZtNzPFYyjqxdZSMYLgHdqNNpAS61G6ok1dYVBHWi"),
|
|
15
|
+
};
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// PDA Seeds
|
|
18
|
+
// ============================================================================
|
|
19
|
+
exports.SEEDS = {
|
|
20
|
+
allowlist: Buffer.from("allowlist"),
|
|
21
|
+
taxConfig: Buffer.from("tax-config"),
|
|
22
|
+
taxDelegate: Buffer.from("tax-delegate"),
|
|
23
|
+
holdConfig: Buffer.from("hold-config"),
|
|
24
|
+
walletLock: Buffer.from("wallet-lock"),
|
|
25
|
+
routerConfig: Buffer.from("router-config"),
|
|
26
|
+
extraAccountMetas: Buffer.from("extra-account-metas"),
|
|
27
|
+
maxBalanceConfig: Buffer.from("max-balance-config"),
|
|
28
|
+
tokenRecord: Buffer.from("token-record"),
|
|
29
|
+
freezeAuthority: Buffer.from("freeze-authority"),
|
|
30
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sinai-standard/types",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Sinai Standard shared TypeScript types",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": ["dist"],
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@coral-xyz/anchor": "^0.31.1",
|
|
14
|
+
"@solana/web3.js": "^1.95.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^5.7.3"
|
|
18
|
+
}
|
|
19
|
+
}
|