@gibs/abis 1.13.0 → 1.13.1

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 (2) hide show
  1. package/llms.txt +48 -0
  2. package/package.json +3 -2
package/llms.txt ADDED
@@ -0,0 +1,48 @@
1
+ # @gibs/abis
2
+
3
+ > Contract interfaces for the Gibs Finance bridge, as viem-ready constants.
4
+ > Each export is an ABI built with viem's `parseAbi`. Pass it to
5
+ > `readContract`, `writeContract` or `getContract` and viem infers the types.
6
+
7
+ ## Install
8
+
9
+ - Run `npm install @gibs/abis viem`.
10
+ - The package is ESM only. Use `import`, not `require`.
11
+ - It needs Node 20 or later.
12
+ - viem is a peer dependency. The range is `>=2.37.0 <3`.
13
+ - Version note: 1.12.0 and older on npm are broken. 1.13.0 is the first usable version.
14
+
15
+ ## Entry point
16
+
17
+ The package has one entry point, `@gibs/abis`. It exports `inputBridge`,
18
+ `erc677`, `outputRouter`, `outputBridge`, `feeManager`, `nativeRouter`,
19
+ `univ2Router` and related constants.
20
+
21
+ ```ts
22
+ import { createPublicClient, http, type Address } from 'viem'
23
+ import { mainnet } from 'viem/chains'
24
+ import { inputBridge } from '@gibs/abis'
25
+
26
+ const client = createPublicClient({ chain: mainnet, transport: http() })
27
+
28
+ /** Reads the smallest amount of a token the bridge accepts in one transfer. */
29
+ export const minimumPerTransfer = (bridge: Address, token: Address) =>
30
+ client.readContract({
31
+ address: bridge,
32
+ abi: inputBridge,
33
+ functionName: 'minPerTx',
34
+ args: [token],
35
+ })
36
+ ```
37
+
38
+ ## Rules
39
+
40
+ - The ABIs hold only the functions and events the bridge interface uses. They are not full contract ABIs.
41
+ - Some bridges take an extra sender-origin argument. Use the `*ExtraInput` ABIs (`inputBridgeExtraInput`, `erc677ExtraInput`) for those.
42
+ - An ABI does not give you addresses. Read addresses from `@gibs/bridge-sdk/config` (`pathway`).
43
+
44
+ ## Links
45
+
46
+ - [README](https://github.com/gibsfinance/bridge/blob/staging/packages/abis/README.md)
47
+ - [@gibs/bridge-sdk llms.txt](https://github.com/gibsfinance/bridge/blob/staging/packages/bridge-sdk/llms.txt)
48
+ - [Gibs Finance llms.txt](https://next.gibs.finance/llms.txt): the whole platform.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gibs/abis",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "description": "Contract interfaces for the Gibs Finance bridge, as viem-ready constants.",
5
5
  "keywords": [
6
6
  "ethereum",
@@ -39,7 +39,8 @@
39
39
  "!dist/tsconfig.tsbuildinfo",
40
40
  "!dist/**/*.test-d.*",
41
41
  "!dist/test-utils",
42
- "LICENSE"
42
+ "LICENSE",
43
+ "llms.txt"
43
44
  ],
44
45
  "scripts": {
45
46
  "prepublishOnly": "npx tsc",