@bulla/registry 0.0.0-stage → 1.0.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.
- package/LICENSE +21 -0
- package/README.md +78 -2
- package/dist/abis/bulla-contracts/BullaBanker.json +206 -0
- package/dist/abis/bulla-contracts/BullaClaimERC721.json +1071 -0
- package/dist/abis/bulla-contracts/BullaFinance.json +416 -0
- package/dist/abis/bulla-contracts/BullaInstantPayment.json +272 -0
- package/dist/abis/bulla-contracts/BullaManager.json +447 -0
- package/dist/abis/bulla-contracts-v2/BullaApprovalRegistry.json +530 -0
- package/dist/abis/bulla-contracts-v2/BullaClaimPermitLib.json +159 -0
- package/dist/abis/bulla-contracts-v2/BullaClaimV2.json +1968 -0
- package/dist/abis/bulla-contracts-v2/BullaFrendLendV2.json +1678 -0
- package/dist/abis/bulla-contracts-v2/BullaInvoice.json +1368 -0
- package/dist/abis/factoring-contracts/BullaFactoringV1.json +2694 -0
- package/dist/abis/factoring-contracts/BullaFactoringV2_1.json +2684 -0
- package/dist/abis/factoring-contracts/BullaFactoringV2_2.json +3157 -0
- package/dist/abis/factoring-contracts/RedemptionQueue.json +580 -0
- package/dist/index.cjs +1288 -0
- package/dist/index.d.cts +144 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.js +1285 -0
- package/factoring-contracts/logos/fundora.svg +40 -0
- package/factoring-contracts/logos/tcs.png +0 -0
- package/package.json +56 -4
- package/registry.json +1283 -0
- package/registry.schema.json +197 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// Generated by scripts/build-package.ts from registry.json and registry.schema.json. Do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* An EVM address, as viem's Address.
|
|
4
|
+
*/
|
|
5
|
+
export type Address = `0x${string}`;
|
|
6
|
+
/**
|
|
7
|
+
* The network's name in the subgraph (bulla-contracts-<slug>) and in pools.json.
|
|
8
|
+
*/
|
|
9
|
+
export type Slug = string;
|
|
10
|
+
export type Url = string;
|
|
11
|
+
/**
|
|
12
|
+
* active: live, including test pools. archived: no longer in use but still resolves, e.g. a pool superseded by a redeploy.
|
|
13
|
+
*/
|
|
14
|
+
export type Category = "active" | "archived";
|
|
15
|
+
export type Bps = number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The shape of registry.json, which every consumer depends on. scripts/consolidate.ts checks each consolidation against it before writing, so a run that breaks the shape or drops a required field fails before anything is committed. Rules JSON Schema can't express (network keys match chainId, pools reference known networks and clients, logo files exist, unique pool addresses) are checked in scripts/validate-registry.ts. The pool and client definitions copy factoring-contracts' pools.schema.json on purpose: a change upstream must also change this file, so it gets reviewed here.
|
|
19
|
+
*/
|
|
20
|
+
export interface BullaRegistry {
|
|
21
|
+
$schema?: string;
|
|
22
|
+
generatedAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* Keyed by chain ID as a decimal string.
|
|
25
|
+
*/
|
|
26
|
+
networks: {
|
|
27
|
+
[k: string]: Network;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Keyed by client key, e.g. tcs. A client is who a factoring pool factors invoices for; one client can have many pools. From factoring-contracts' pools.json.
|
|
31
|
+
*/
|
|
32
|
+
clients: {
|
|
33
|
+
[k: string]: Client;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Every factoring pool on every chain, archived ones included. From factoring-contracts' pools.json.
|
|
37
|
+
*
|
|
38
|
+
* @minItems 1
|
|
39
|
+
*/
|
|
40
|
+
pools: [Pool, ...Pool[]];
|
|
41
|
+
}
|
|
42
|
+
export interface Network {
|
|
43
|
+
name: string;
|
|
44
|
+
chainId: number;
|
|
45
|
+
slug: Slug;
|
|
46
|
+
subgraph: SubgraphEndpoints;
|
|
47
|
+
/**
|
|
48
|
+
* Keyed by source repo, then contract name.
|
|
49
|
+
*/
|
|
50
|
+
contracts: Partial<Record<"bulla-contracts" | "bulla-contracts-v2" | "factoring-contracts", Record<string, Address>>>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* One endpoint per Goldsky tag: dev for the dev stage, prod for production. They are constant (the network slug plus a fixed tag) and change only when a network is added; which build a tag serves is set by tagging in the subgraph repo.
|
|
54
|
+
*/
|
|
55
|
+
export interface SubgraphEndpoints {
|
|
56
|
+
dev: Url;
|
|
57
|
+
prod: Url;
|
|
58
|
+
}
|
|
59
|
+
export interface Client {
|
|
60
|
+
displayName: string;
|
|
61
|
+
website?: Url;
|
|
62
|
+
/**
|
|
63
|
+
* An https URL, or a path relative to registry.json (e.g. factoring-contracts/logos/tcs.png). Absent: show the Bulla logo.
|
|
64
|
+
*/
|
|
65
|
+
logo?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface Pool {
|
|
68
|
+
/**
|
|
69
|
+
* A key of networks.
|
|
70
|
+
*/
|
|
71
|
+
chainId: number;
|
|
72
|
+
/**
|
|
73
|
+
* The network's name in the subgraph (bulla-contracts-<slug>) and in pools.json.
|
|
74
|
+
*/
|
|
75
|
+
network: string;
|
|
76
|
+
/**
|
|
77
|
+
* The pool contract, which is also its share token.
|
|
78
|
+
*/
|
|
79
|
+
address: Address;
|
|
80
|
+
version: "V0" | "V1" | "V2_1" | "V2_2";
|
|
81
|
+
/**
|
|
82
|
+
* A key of clients. Separate from poolKey: tcs-wyoming is client tcs.
|
|
83
|
+
*/
|
|
84
|
+
client: string;
|
|
85
|
+
/**
|
|
86
|
+
* The name factoring-contracts' deploy scripts take, e.g. tcs-wyoming. A redeploy keeps the poolKey, so several pools on a chain can share one, but only one of them is current (no supersededBy). Only pools those scripts manage have one.
|
|
87
|
+
*/
|
|
88
|
+
poolKey?: string;
|
|
89
|
+
displayName: string;
|
|
90
|
+
category: Category;
|
|
91
|
+
/**
|
|
92
|
+
* The pool on the same chain that replaced this one when it was redeployed.
|
|
93
|
+
*/
|
|
94
|
+
supersededBy?: Address;
|
|
95
|
+
shareToken: ShareToken;
|
|
96
|
+
asset: Asset;
|
|
97
|
+
insured: boolean;
|
|
98
|
+
enforceKyc: boolean;
|
|
99
|
+
permissions: Permissions;
|
|
100
|
+
underwriter: Address;
|
|
101
|
+
fees: Fees;
|
|
102
|
+
/**
|
|
103
|
+
* The block that created the pool; the subgraph's start block for it.
|
|
104
|
+
*/
|
|
105
|
+
deployBlock: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The pool's own ERC-20 share token. Its address is the pool address.
|
|
109
|
+
*/
|
|
110
|
+
export interface ShareToken {
|
|
111
|
+
symbol: string;
|
|
112
|
+
name: string;
|
|
113
|
+
decimals: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The underlying asset the pool takes deposits in and funds invoices with.
|
|
117
|
+
*/
|
|
118
|
+
export interface Asset {
|
|
119
|
+
address: Address;
|
|
120
|
+
symbol: string;
|
|
121
|
+
name: string;
|
|
122
|
+
decimals: number;
|
|
123
|
+
kind: "stable" | "volatile";
|
|
124
|
+
}
|
|
125
|
+
export interface Permissions {
|
|
126
|
+
factoring: Address;
|
|
127
|
+
deposit: Address;
|
|
128
|
+
/**
|
|
129
|
+
* Absent on V0 and V1 pools, which have no redeem permissions; present from V2.1 on.
|
|
130
|
+
*/
|
|
131
|
+
redeem?: Address;
|
|
132
|
+
}
|
|
133
|
+
export interface Fees {
|
|
134
|
+
protocolBps: Bps;
|
|
135
|
+
adminBps: Bps;
|
|
136
|
+
targetYieldBps: Bps;
|
|
137
|
+
/**
|
|
138
|
+
* Absent before V2.2, which has no insurance fee; present on every V2.2 pool.
|
|
139
|
+
*/
|
|
140
|
+
insuranceBps?: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare const registry: BullaRegistry;
|
|
144
|
+
export default registry;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// Generated by scripts/build-package.ts from registry.json and registry.schema.json. Do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* An EVM address, as viem's Address.
|
|
4
|
+
*/
|
|
5
|
+
export type Address = `0x${string}`;
|
|
6
|
+
/**
|
|
7
|
+
* The network's name in the subgraph (bulla-contracts-<slug>) and in pools.json.
|
|
8
|
+
*/
|
|
9
|
+
export type Slug = string;
|
|
10
|
+
export type Url = string;
|
|
11
|
+
/**
|
|
12
|
+
* active: live, including test pools. archived: no longer in use but still resolves, e.g. a pool superseded by a redeploy.
|
|
13
|
+
*/
|
|
14
|
+
export type Category = "active" | "archived";
|
|
15
|
+
export type Bps = number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The shape of registry.json, which every consumer depends on. scripts/consolidate.ts checks each consolidation against it before writing, so a run that breaks the shape or drops a required field fails before anything is committed. Rules JSON Schema can't express (network keys match chainId, pools reference known networks and clients, logo files exist, unique pool addresses) are checked in scripts/validate-registry.ts. The pool and client definitions copy factoring-contracts' pools.schema.json on purpose: a change upstream must also change this file, so it gets reviewed here.
|
|
19
|
+
*/
|
|
20
|
+
export interface BullaRegistry {
|
|
21
|
+
$schema?: string;
|
|
22
|
+
generatedAt: string;
|
|
23
|
+
/**
|
|
24
|
+
* Keyed by chain ID as a decimal string.
|
|
25
|
+
*/
|
|
26
|
+
networks: {
|
|
27
|
+
[k: string]: Network;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Keyed by client key, e.g. tcs. A client is who a factoring pool factors invoices for; one client can have many pools. From factoring-contracts' pools.json.
|
|
31
|
+
*/
|
|
32
|
+
clients: {
|
|
33
|
+
[k: string]: Client;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Every factoring pool on every chain, archived ones included. From factoring-contracts' pools.json.
|
|
37
|
+
*
|
|
38
|
+
* @minItems 1
|
|
39
|
+
*/
|
|
40
|
+
pools: [Pool, ...Pool[]];
|
|
41
|
+
}
|
|
42
|
+
export interface Network {
|
|
43
|
+
name: string;
|
|
44
|
+
chainId: number;
|
|
45
|
+
slug: Slug;
|
|
46
|
+
subgraph: SubgraphEndpoints;
|
|
47
|
+
/**
|
|
48
|
+
* Keyed by source repo, then contract name.
|
|
49
|
+
*/
|
|
50
|
+
contracts: Partial<Record<"bulla-contracts" | "bulla-contracts-v2" | "factoring-contracts", Record<string, Address>>>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* One endpoint per Goldsky tag: dev for the dev stage, prod for production. They are constant (the network slug plus a fixed tag) and change only when a network is added; which build a tag serves is set by tagging in the subgraph repo.
|
|
54
|
+
*/
|
|
55
|
+
export interface SubgraphEndpoints {
|
|
56
|
+
dev: Url;
|
|
57
|
+
prod: Url;
|
|
58
|
+
}
|
|
59
|
+
export interface Client {
|
|
60
|
+
displayName: string;
|
|
61
|
+
website?: Url;
|
|
62
|
+
/**
|
|
63
|
+
* An https URL, or a path relative to registry.json (e.g. factoring-contracts/logos/tcs.png). Absent: show the Bulla logo.
|
|
64
|
+
*/
|
|
65
|
+
logo?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface Pool {
|
|
68
|
+
/**
|
|
69
|
+
* A key of networks.
|
|
70
|
+
*/
|
|
71
|
+
chainId: number;
|
|
72
|
+
/**
|
|
73
|
+
* The network's name in the subgraph (bulla-contracts-<slug>) and in pools.json.
|
|
74
|
+
*/
|
|
75
|
+
network: string;
|
|
76
|
+
/**
|
|
77
|
+
* The pool contract, which is also its share token.
|
|
78
|
+
*/
|
|
79
|
+
address: Address;
|
|
80
|
+
version: "V0" | "V1" | "V2_1" | "V2_2";
|
|
81
|
+
/**
|
|
82
|
+
* A key of clients. Separate from poolKey: tcs-wyoming is client tcs.
|
|
83
|
+
*/
|
|
84
|
+
client: string;
|
|
85
|
+
/**
|
|
86
|
+
* The name factoring-contracts' deploy scripts take, e.g. tcs-wyoming. A redeploy keeps the poolKey, so several pools on a chain can share one, but only one of them is current (no supersededBy). Only pools those scripts manage have one.
|
|
87
|
+
*/
|
|
88
|
+
poolKey?: string;
|
|
89
|
+
displayName: string;
|
|
90
|
+
category: Category;
|
|
91
|
+
/**
|
|
92
|
+
* The pool on the same chain that replaced this one when it was redeployed.
|
|
93
|
+
*/
|
|
94
|
+
supersededBy?: Address;
|
|
95
|
+
shareToken: ShareToken;
|
|
96
|
+
asset: Asset;
|
|
97
|
+
insured: boolean;
|
|
98
|
+
enforceKyc: boolean;
|
|
99
|
+
permissions: Permissions;
|
|
100
|
+
underwriter: Address;
|
|
101
|
+
fees: Fees;
|
|
102
|
+
/**
|
|
103
|
+
* The block that created the pool; the subgraph's start block for it.
|
|
104
|
+
*/
|
|
105
|
+
deployBlock: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The pool's own ERC-20 share token. Its address is the pool address.
|
|
109
|
+
*/
|
|
110
|
+
export interface ShareToken {
|
|
111
|
+
symbol: string;
|
|
112
|
+
name: string;
|
|
113
|
+
decimals: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The underlying asset the pool takes deposits in and funds invoices with.
|
|
117
|
+
*/
|
|
118
|
+
export interface Asset {
|
|
119
|
+
address: Address;
|
|
120
|
+
symbol: string;
|
|
121
|
+
name: string;
|
|
122
|
+
decimals: number;
|
|
123
|
+
kind: "stable" | "volatile";
|
|
124
|
+
}
|
|
125
|
+
export interface Permissions {
|
|
126
|
+
factoring: Address;
|
|
127
|
+
deposit: Address;
|
|
128
|
+
/**
|
|
129
|
+
* Absent on V0 and V1 pools, which have no redeem permissions; present from V2.1 on.
|
|
130
|
+
*/
|
|
131
|
+
redeem?: Address;
|
|
132
|
+
}
|
|
133
|
+
export interface Fees {
|
|
134
|
+
protocolBps: Bps;
|
|
135
|
+
adminBps: Bps;
|
|
136
|
+
targetYieldBps: Bps;
|
|
137
|
+
/**
|
|
138
|
+
* Absent before V2.2, which has no insurance fee; present on every V2.2 pool.
|
|
139
|
+
*/
|
|
140
|
+
insuranceBps?: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare const registry: BullaRegistry;
|
|
144
|
+
export default registry;
|