@bordrless/shared 0.0.0-stage → 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/LICENSE +202 -0
- package/README.md +33 -2
- package/dist/api.d.ts +657 -0
- package/dist/api.js +6 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/policy.d.ts +622 -0
- package/dist/policy.js +975 -0
- package/dist/programs.d.ts +112 -0
- package/dist/programs.js +140 -0
- package/package.json +44 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Program addresses and the protocol's other fixed keys, the one place they are written down (the
|
|
3
|
+
* same on mainnet, devnet and localnet: one set of program keypairs, generated 2026-10-07). Every
|
|
4
|
+
* fixed key is a PDA with constant seeds; `packages/sdk` derives each again in its tests and fails
|
|
5
|
+
* if one differs.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PROGRAM_IDS: {
|
|
8
|
+
readonly token: "2XoEWp8cF3kRXg74eVwPAyTFhVCAztn3V88komxAvr22";
|
|
9
|
+
readonly swap: "GyzKSnnEu2uN5bBRecE4XYY2enbfR2D2MtxnbJPGy7hk";
|
|
10
|
+
readonly bridge: "CtLkuFVitoXHTa86Hfp8KmfSDfqJaMYFWr6EGmQVsKb7";
|
|
11
|
+
readonly launch: "1jcBymHxBjniZDhNPy51Vgm5Nz7pLUdxa9UBHc4TavC";
|
|
12
|
+
readonly taxHook: "8tjnVSreJGBRQFyDBf1SyyhBgLsdBxa2rHYh9sbxFyX7";
|
|
13
|
+
/** The v2 token-rules hook (docs/hooks-v2.md §4): holder rewards, max wallet and the two locks. */
|
|
14
|
+
readonly kit: "14RJQXPdJfkehit6ezktjd3xujamf8nVSKw2shKamaEH";
|
|
15
|
+
};
|
|
16
|
+
/** The wSOL mint, which stands for native SOL on the bridge. */
|
|
17
|
+
export declare const NATIVE_MINT = "So11111111111111111111111111111111111111112";
|
|
18
|
+
export declare const TOKEN_PROGRAM_ID = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
19
|
+
export declare const TOKEN_2022_PROGRAM_ID = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
20
|
+
export declare const SYSTEM_PROGRAM_ID = "11111111111111111111111111111111";
|
|
21
|
+
export declare const ASSOCIATED_TOKEN_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
22
|
+
export declare const COMPUTE_BUDGET_PROGRAM_ID = "ComputeBudget111111111111111111111111111111";
|
|
23
|
+
/**
|
|
24
|
+
* The signers of hook callbacks (docs/hooks-v2.md, Review fixes, note 1): the token program signs
|
|
25
|
+
* every callback to a token hook with `["hook-authority", hook_program]` under the token program,
|
|
26
|
+
* and the DEX every callback to a pool hook with `["hook-authority", hook_program]` under the DEX.
|
|
27
|
+
* A hook accepts only its own signer, so a signer one hook receives and passes on is refused
|
|
28
|
+
* everywhere else. The v1 global signers (`D7gU…`, `HoUi…`) are gone.
|
|
29
|
+
*/
|
|
30
|
+
export declare const HOOK_SIGNERS: {
|
|
31
|
+
/** The token program's signer of the kit's callbacks (bump 254). */
|
|
32
|
+
readonly tokenForKit: "C2Y3B3hZTesJQqLYrZ7qoaZUoRmwYWh5Qh3MuFxruouE";
|
|
33
|
+
/** The token program's signer of `tax_hook`'s callbacks (bump 255). */
|
|
34
|
+
readonly tokenForTaxHook: "8v2CVajpJMVKXLpZePXQpqvq2nyn7r1so7DxgXu4CkAw";
|
|
35
|
+
/** The DEX's signer of the launch's pool callbacks (bump 252). */
|
|
36
|
+
readonly dexForLaunch: "6Ztfr97cUewdViXDXdZUsQq4pz7MYdygvK1WijALjZ5q";
|
|
37
|
+
};
|
|
38
|
+
/** Fixed PDAs of the programs (programs-summary §5), with the seeds each is derived from. */
|
|
39
|
+
export declare const FIXED_ADDRESSES: {
|
|
40
|
+
/** `["__event_authority"]` under the token program. */
|
|
41
|
+
readonly tokenEventAuthority: "69vhpnkYjtiJgdfU7QsA5Ww7V8FWtvPcZ2r4znuyByvq";
|
|
42
|
+
/** `["__event_authority"]` under the DEX. */
|
|
43
|
+
readonly swapEventAuthority: "9cBz2tsg7FwopSsd6HzvtbiL6b7B46eLG436etkB7cyx";
|
|
44
|
+
/** `["config"]` under the DEX. */
|
|
45
|
+
readonly swapConfig: "2XLvgczuVACmvvjfRLLAcLwMzFHutbAAro61zZKP8fsx";
|
|
46
|
+
/** `["__event_authority"]` under the bridge. */
|
|
47
|
+
readonly bridgeEventAuthority: "EiUK62AP8DwUJWBosf7Ceyih3sGAicZxmsmcBftHzM8n";
|
|
48
|
+
/** `["config"]` under the bridge. */
|
|
49
|
+
readonly bridgeConfig: "Dwf4C8tTMYwicp8cU5MYcTtMQVVJTN7W3LcXCQ1UEhMs";
|
|
50
|
+
/** `["wrapper", NATIVE_MINT]` under the bridge. */
|
|
51
|
+
readonly solWrapper: "3ta59VvLDKLnCKMhYihiC3fQ7W9jPKty6xfx3h5puHGS";
|
|
52
|
+
/** `["sol-vault"]` under the bridge: the lamports behind bridged SOL. */
|
|
53
|
+
readonly solVault: "EAcZR2i8A6BbnKRdWuyMVDTuiNkD6qc4RkFpxUYJ9Qba";
|
|
54
|
+
/** `["wrapped", NATIVE_MINT]` under the bridge: bridged SOL, the quote of every launch (no hook). */
|
|
55
|
+
readonly bridgedSolMint: "A49oVhX22ExMwTEtFC6Y8nhBdZ4LJDGhdXLDn4c2f59i";
|
|
56
|
+
/** `["__event_authority"]` under the launchpad. */
|
|
57
|
+
readonly launchEventAuthority: "6ogQR9x8o86egutFri8ev6Kx6reTDg8YdwPmvkW29efh";
|
|
58
|
+
/** `["hook-authority"]` under the launchpad: it creates launch pools and finalizes their curves. */
|
|
59
|
+
readonly launchHookAuthority: "3dfEZLdjRcpTJ4RxPzgkqnqaG2FipRdaHgRW72AL6kqL";
|
|
60
|
+
/** `["config"]` under the launchpad. */
|
|
61
|
+
readonly launchConfig: "5n25iAaXFsjs4UgGQM6fCiRhaQcCVQ1L5BgyRZ7UrmaE";
|
|
62
|
+
/** `["__event_authority"]` under the kit. */
|
|
63
|
+
readonly kitEventAuthority: "9abhxVTuwck5Ux79act3e2Vkfem7Q4zBwATMctUvHvuE";
|
|
64
|
+
/** `["hook-authority"]` under the kit: it signs the token program's `write_hook_data` in `claim`. */
|
|
65
|
+
readonly kitHookAuthority: "2repKA1JgDkBo4AffscVee342dcBcH6c2yfpUTRrAiEN";
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* The protocol lookup table (docs/hooks-v2.md §6; programs-summary §2.7): the 18 fixed addresses
|
|
69
|
+
* no top-level instruction invokes, in the order the programs' tests load them and `pnpm admin
|
|
70
|
+
* init` must write them (a v0 message names table entries by index). Programs a transaction
|
|
71
|
+
* invokes at top level (the kit for claims and shares) are kept in the static keys by the v0
|
|
72
|
+
* compiler. Per-mint accounts cannot be in it.
|
|
73
|
+
*/
|
|
74
|
+
export declare const PROTOCOL_LOOKUP_TABLE_ADDRESSES: readonly string[];
|
|
75
|
+
/** Token hook flags (`Mint.hookFlags`). */
|
|
76
|
+
export declare const TOKEN_HOOK_FLAGS: {
|
|
77
|
+
readonly BEFORE_TRANSFER: number;
|
|
78
|
+
readonly AFTER_TRANSFER: number;
|
|
79
|
+
readonly BEFORE_MINT: number;
|
|
80
|
+
readonly AFTER_MINT: number;
|
|
81
|
+
readonly BEFORE_BURN: number;
|
|
82
|
+
readonly AFTER_BURN: number;
|
|
83
|
+
readonly TRANSFER_RETURNS_DELTA: number;
|
|
84
|
+
/** v2: the hook may write the 64 bytes of hook data each holding keeps. */
|
|
85
|
+
readonly WRITES_HOOK_DATA: number;
|
|
86
|
+
};
|
|
87
|
+
/** Every token hook flag (`token_flags::ALL`). */
|
|
88
|
+
export declare const TOKEN_HOOK_FLAGS_ALL = 255;
|
|
89
|
+
/** Pool hook flags (`Pool.hookFlags`). */
|
|
90
|
+
export declare const POOL_HOOK_FLAGS: {
|
|
91
|
+
readonly BEFORE_INITIALIZE: number;
|
|
92
|
+
readonly AFTER_INITIALIZE: number;
|
|
93
|
+
readonly BEFORE_ADD_LIQUIDITY: number;
|
|
94
|
+
readonly AFTER_ADD_LIQUIDITY: number;
|
|
95
|
+
readonly BEFORE_REMOVE_LIQUIDITY: number;
|
|
96
|
+
readonly AFTER_REMOVE_LIQUIDITY: number;
|
|
97
|
+
readonly BEFORE_SWAP: number;
|
|
98
|
+
readonly AFTER_SWAP: number;
|
|
99
|
+
/** v2: also allows the answer's `burn`. */
|
|
100
|
+
readonly BEFORE_SWAP_RETURNS_DELTA: number;
|
|
101
|
+
/** v2: also allows the answer's `burn`. */
|
|
102
|
+
readonly AFTER_SWAP_RETURNS_DELTA: number;
|
|
103
|
+
readonly BEFORE_SWAP_OVERRIDES_FEE: number;
|
|
104
|
+
};
|
|
105
|
+
/** Every pool hook flag (`pool_flags::ALL`). */
|
|
106
|
+
export declare const POOL_HOOK_FLAGS_ALL = 2047;
|
|
107
|
+
/** A launch pool's flags (`LAUNCH_HOOK_FLAGS`): before initialize, before and after swap, both deltas, the fee override: 1985. */
|
|
108
|
+
export declare const LAUNCH_POOL_HOOK_FLAGS: number;
|
|
109
|
+
/** Bytes of hook data every holding keeps (`HOOK_DATA_LEN`). */
|
|
110
|
+
export declare const HOOK_DATA_LEN = 64;
|
|
111
|
+
/** Names of the flags, for the docs and the token page. */
|
|
112
|
+
export declare function describeHookFlags(flags: number, table: Record<string, number>): string[];
|
package/dist/programs.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Program addresses and the protocol's other fixed keys, the one place they are written down (the
|
|
3
|
+
* same on mainnet, devnet and localnet: one set of program keypairs, generated 2026-10-07). Every
|
|
4
|
+
* fixed key is a PDA with constant seeds; `packages/sdk` derives each again in its tests and fails
|
|
5
|
+
* if one differs.
|
|
6
|
+
*/
|
|
7
|
+
export const PROGRAM_IDS = {
|
|
8
|
+
token: '2XoEWp8cF3kRXg74eVwPAyTFhVCAztn3V88komxAvr22',
|
|
9
|
+
swap: 'GyzKSnnEu2uN5bBRecE4XYY2enbfR2D2MtxnbJPGy7hk',
|
|
10
|
+
bridge: 'CtLkuFVitoXHTa86Hfp8KmfSDfqJaMYFWr6EGmQVsKb7',
|
|
11
|
+
launch: '1jcBymHxBjniZDhNPy51Vgm5Nz7pLUdxa9UBHc4TavC',
|
|
12
|
+
taxHook: '8tjnVSreJGBRQFyDBf1SyyhBgLsdBxa2rHYh9sbxFyX7',
|
|
13
|
+
/** The v2 token-rules hook (docs/hooks-v2.md §4): holder rewards, max wallet and the two locks. */
|
|
14
|
+
kit: '14RJQXPdJfkehit6ezktjd3xujamf8nVSKw2shKamaEH',
|
|
15
|
+
};
|
|
16
|
+
/** The wSOL mint, which stands for native SOL on the bridge. */
|
|
17
|
+
export const NATIVE_MINT = 'So11111111111111111111111111111111111111112';
|
|
18
|
+
export const TOKEN_PROGRAM_ID = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
19
|
+
export const TOKEN_2022_PROGRAM_ID = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
|
|
20
|
+
export const SYSTEM_PROGRAM_ID = '11111111111111111111111111111111';
|
|
21
|
+
export const ASSOCIATED_TOKEN_PROGRAM_ID = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
22
|
+
export const COMPUTE_BUDGET_PROGRAM_ID = 'ComputeBudget111111111111111111111111111111';
|
|
23
|
+
/**
|
|
24
|
+
* The signers of hook callbacks (docs/hooks-v2.md, Review fixes, note 1): the token program signs
|
|
25
|
+
* every callback to a token hook with `["hook-authority", hook_program]` under the token program,
|
|
26
|
+
* and the DEX every callback to a pool hook with `["hook-authority", hook_program]` under the DEX.
|
|
27
|
+
* A hook accepts only its own signer, so a signer one hook receives and passes on is refused
|
|
28
|
+
* everywhere else. The v1 global signers (`D7gU…`, `HoUi…`) are gone.
|
|
29
|
+
*/
|
|
30
|
+
export const HOOK_SIGNERS = {
|
|
31
|
+
/** The token program's signer of the kit's callbacks (bump 254). */
|
|
32
|
+
tokenForKit: 'C2Y3B3hZTesJQqLYrZ7qoaZUoRmwYWh5Qh3MuFxruouE',
|
|
33
|
+
/** The token program's signer of `tax_hook`'s callbacks (bump 255). */
|
|
34
|
+
tokenForTaxHook: '8v2CVajpJMVKXLpZePXQpqvq2nyn7r1so7DxgXu4CkAw',
|
|
35
|
+
/** The DEX's signer of the launch's pool callbacks (bump 252). */
|
|
36
|
+
dexForLaunch: '6Ztfr97cUewdViXDXdZUsQq4pz7MYdygvK1WijALjZ5q',
|
|
37
|
+
};
|
|
38
|
+
/** Fixed PDAs of the programs (programs-summary §5), with the seeds each is derived from. */
|
|
39
|
+
export const FIXED_ADDRESSES = {
|
|
40
|
+
/** `["__event_authority"]` under the token program. */
|
|
41
|
+
tokenEventAuthority: '69vhpnkYjtiJgdfU7QsA5Ww7V8FWtvPcZ2r4znuyByvq',
|
|
42
|
+
/** `["__event_authority"]` under the DEX. */
|
|
43
|
+
swapEventAuthority: '9cBz2tsg7FwopSsd6HzvtbiL6b7B46eLG436etkB7cyx',
|
|
44
|
+
/** `["config"]` under the DEX. */
|
|
45
|
+
swapConfig: '2XLvgczuVACmvvjfRLLAcLwMzFHutbAAro61zZKP8fsx',
|
|
46
|
+
/** `["__event_authority"]` under the bridge. */
|
|
47
|
+
bridgeEventAuthority: 'EiUK62AP8DwUJWBosf7Ceyih3sGAicZxmsmcBftHzM8n',
|
|
48
|
+
/** `["config"]` under the bridge. */
|
|
49
|
+
bridgeConfig: 'Dwf4C8tTMYwicp8cU5MYcTtMQVVJTN7W3LcXCQ1UEhMs',
|
|
50
|
+
/** `["wrapper", NATIVE_MINT]` under the bridge. */
|
|
51
|
+
solWrapper: '3ta59VvLDKLnCKMhYihiC3fQ7W9jPKty6xfx3h5puHGS',
|
|
52
|
+
/** `["sol-vault"]` under the bridge: the lamports behind bridged SOL. */
|
|
53
|
+
solVault: 'EAcZR2i8A6BbnKRdWuyMVDTuiNkD6qc4RkFpxUYJ9Qba',
|
|
54
|
+
/** `["wrapped", NATIVE_MINT]` under the bridge: bridged SOL, the quote of every launch (no hook). */
|
|
55
|
+
bridgedSolMint: 'A49oVhX22ExMwTEtFC6Y8nhBdZ4LJDGhdXLDn4c2f59i',
|
|
56
|
+
/** `["__event_authority"]` under the launchpad. */
|
|
57
|
+
launchEventAuthority: '6ogQR9x8o86egutFri8ev6Kx6reTDg8YdwPmvkW29efh',
|
|
58
|
+
/** `["hook-authority"]` under the launchpad: it creates launch pools and finalizes their curves. */
|
|
59
|
+
launchHookAuthority: '3dfEZLdjRcpTJ4RxPzgkqnqaG2FipRdaHgRW72AL6kqL',
|
|
60
|
+
/** `["config"]` under the launchpad. */
|
|
61
|
+
launchConfig: '5n25iAaXFsjs4UgGQM6fCiRhaQcCVQ1L5BgyRZ7UrmaE',
|
|
62
|
+
/** `["__event_authority"]` under the kit. */
|
|
63
|
+
kitEventAuthority: '9abhxVTuwck5Ux79act3e2Vkfem7Q4zBwATMctUvHvuE',
|
|
64
|
+
/** `["hook-authority"]` under the kit: it signs the token program's `write_hook_data` in `claim`. */
|
|
65
|
+
kitHookAuthority: '2repKA1JgDkBo4AffscVee342dcBcH6c2yfpUTRrAiEN',
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* The protocol lookup table (docs/hooks-v2.md §6; programs-summary §2.7): the 18 fixed addresses
|
|
69
|
+
* no top-level instruction invokes, in the order the programs' tests load them and `pnpm admin
|
|
70
|
+
* init` must write them (a v0 message names table entries by index). Programs a transaction
|
|
71
|
+
* invokes at top level (the kit for claims and shares) are kept in the static keys by the v0
|
|
72
|
+
* compiler. Per-mint accounts cannot be in it.
|
|
73
|
+
*/
|
|
74
|
+
export const PROTOCOL_LOOKUP_TABLE_ADDRESSES = [
|
|
75
|
+
FIXED_ADDRESSES.tokenEventAuthority,
|
|
76
|
+
HOOK_SIGNERS.tokenForKit,
|
|
77
|
+
FIXED_ADDRESSES.swapEventAuthority,
|
|
78
|
+
HOOK_SIGNERS.dexForLaunch,
|
|
79
|
+
FIXED_ADDRESSES.swapConfig,
|
|
80
|
+
FIXED_ADDRESSES.bridgeEventAuthority,
|
|
81
|
+
FIXED_ADDRESSES.bridgeConfig,
|
|
82
|
+
FIXED_ADDRESSES.solWrapper,
|
|
83
|
+
FIXED_ADDRESSES.solVault,
|
|
84
|
+
FIXED_ADDRESSES.launchEventAuthority,
|
|
85
|
+
FIXED_ADDRESSES.launchHookAuthority,
|
|
86
|
+
FIXED_ADDRESSES.launchConfig,
|
|
87
|
+
FIXED_ADDRESSES.kitEventAuthority,
|
|
88
|
+
FIXED_ADDRESSES.kitHookAuthority,
|
|
89
|
+
PROGRAM_IDS.kit,
|
|
90
|
+
FIXED_ADDRESSES.bridgedSolMint,
|
|
91
|
+
SYSTEM_PROGRAM_ID,
|
|
92
|
+
ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
93
|
+
];
|
|
94
|
+
/** Token hook flags (`Mint.hookFlags`). */
|
|
95
|
+
export const TOKEN_HOOK_FLAGS = {
|
|
96
|
+
BEFORE_TRANSFER: 1 << 0,
|
|
97
|
+
AFTER_TRANSFER: 1 << 1,
|
|
98
|
+
BEFORE_MINT: 1 << 2,
|
|
99
|
+
AFTER_MINT: 1 << 3,
|
|
100
|
+
BEFORE_BURN: 1 << 4,
|
|
101
|
+
AFTER_BURN: 1 << 5,
|
|
102
|
+
TRANSFER_RETURNS_DELTA: 1 << 6,
|
|
103
|
+
/** v2: the hook may write the 64 bytes of hook data each holding keeps. */
|
|
104
|
+
WRITES_HOOK_DATA: 1 << 7,
|
|
105
|
+
};
|
|
106
|
+
/** Every token hook flag (`token_flags::ALL`). */
|
|
107
|
+
export const TOKEN_HOOK_FLAGS_ALL = 255;
|
|
108
|
+
/** Pool hook flags (`Pool.hookFlags`). */
|
|
109
|
+
export const POOL_HOOK_FLAGS = {
|
|
110
|
+
BEFORE_INITIALIZE: 1 << 0,
|
|
111
|
+
AFTER_INITIALIZE: 1 << 1,
|
|
112
|
+
BEFORE_ADD_LIQUIDITY: 1 << 2,
|
|
113
|
+
AFTER_ADD_LIQUIDITY: 1 << 3,
|
|
114
|
+
BEFORE_REMOVE_LIQUIDITY: 1 << 4,
|
|
115
|
+
AFTER_REMOVE_LIQUIDITY: 1 << 5,
|
|
116
|
+
BEFORE_SWAP: 1 << 6,
|
|
117
|
+
AFTER_SWAP: 1 << 7,
|
|
118
|
+
/** v2: also allows the answer's `burn`. */
|
|
119
|
+
BEFORE_SWAP_RETURNS_DELTA: 1 << 8,
|
|
120
|
+
/** v2: also allows the answer's `burn`. */
|
|
121
|
+
AFTER_SWAP_RETURNS_DELTA: 1 << 9,
|
|
122
|
+
BEFORE_SWAP_OVERRIDES_FEE: 1 << 10,
|
|
123
|
+
};
|
|
124
|
+
/** Every pool hook flag (`pool_flags::ALL`). */
|
|
125
|
+
export const POOL_HOOK_FLAGS_ALL = 2_047;
|
|
126
|
+
/** A launch pool's flags (`LAUNCH_HOOK_FLAGS`): before initialize, before and after swap, both deltas, the fee override: 1985. */
|
|
127
|
+
export const LAUNCH_POOL_HOOK_FLAGS = POOL_HOOK_FLAGS.BEFORE_INITIALIZE |
|
|
128
|
+
POOL_HOOK_FLAGS.BEFORE_SWAP |
|
|
129
|
+
POOL_HOOK_FLAGS.AFTER_SWAP |
|
|
130
|
+
POOL_HOOK_FLAGS.BEFORE_SWAP_RETURNS_DELTA |
|
|
131
|
+
POOL_HOOK_FLAGS.AFTER_SWAP_RETURNS_DELTA |
|
|
132
|
+
POOL_HOOK_FLAGS.BEFORE_SWAP_OVERRIDES_FEE;
|
|
133
|
+
/** Bytes of hook data every holding keeps (`HOOK_DATA_LEN`). */
|
|
134
|
+
export const HOOK_DATA_LEN = 64;
|
|
135
|
+
/** Names of the flags, for the docs and the token page. */
|
|
136
|
+
export function describeHookFlags(flags, table) {
|
|
137
|
+
return Object.entries(table)
|
|
138
|
+
.filter(([, bit]) => (flags & bit) !== 0)
|
|
139
|
+
.map(([name]) => name.toLowerCase().replace(/_/g, ' '));
|
|
140
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bordrless/shared",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Bordrless policy (the same math as crates/bordrless-core), program addresses and the API types shared by the server and the site. No Solana dependencies.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/BordrlessDex/bordrless-sdk.git",
|
|
10
|
+
"directory": "packages/shared"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/BordrlessDex/bordrless-sdk#readme",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"solana",
|
|
15
|
+
"bordrless",
|
|
16
|
+
"hooks",
|
|
17
|
+
"dex",
|
|
18
|
+
"launchpad",
|
|
19
|
+
"anchor"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"README.md",
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "5.9.2",
|
|
40
|
+
"vitest": "4.1.11"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc -p tsconfig.build.json",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"test": "vitest run --passWithNoTests"
|
|
46
|
+
}
|
|
6
47
|
}
|