@centrifuge/sdk 0.0.0-alpha.25 → 0.0.0-alpha.27
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/README.md +1 -1
- package/dist/Centrifuge.d.ts +0 -162
- package/dist/Centrifuge.d.ts.map +1 -1
- package/dist/Centrifuge.js +95 -200
- package/dist/Centrifuge.js.map +1 -1
- package/dist/Centrifuge.test.js +14 -14
- package/dist/Centrifuge.test.js.map +1 -1
- package/dist/abi/BalanceSheet.abi.d.ts +1 -1
- package/dist/abi/BalanceSheet.abi.js +6 -6
- package/dist/abi/BalanceSheet.abi.js.map +1 -1
- package/dist/abi/ERC6909.abi.d.ts +3 -0
- package/dist/abi/ERC6909.abi.d.ts.map +1 -0
- package/dist/abi/ERC6909.abi.js +19 -0
- package/dist/abi/ERC6909.abi.js.map +1 -0
- package/dist/abi/index.d.ts +229 -0
- package/dist/abi/index.d.ts.map +1 -1
- package/dist/abi/index.js +2 -0
- package/dist/abi/index.js.map +1 -1
- package/dist/config/protocol.js +1 -1
- package/dist/entities/BalanceSheet.d.ts +6 -1
- package/dist/entities/BalanceSheet.d.ts.map +1 -1
- package/dist/entities/BalanceSheet.js +78 -2
- package/dist/entities/BalanceSheet.js.map +1 -1
- package/dist/entities/BalanceSheet.test.js +19 -2
- package/dist/entities/BalanceSheet.test.js.map +1 -1
- package/dist/entities/Pool.d.ts +12 -0
- package/dist/entities/Pool.d.ts.map +1 -1
- package/dist/entities/Pool.js +20 -23
- package/dist/entities/Pool.js.map +1 -1
- package/dist/entities/Pool.test.js +1 -1
- package/dist/entities/Pool.test.js.map +1 -1
- package/dist/entities/PoolNetwork.d.ts +2 -0
- package/dist/entities/PoolNetwork.d.ts.map +1 -1
- package/dist/entities/PoolNetwork.js +15 -4
- package/dist/entities/PoolNetwork.js.map +1 -1
- package/dist/entities/PoolNetwork.test.js +1 -1
- package/dist/entities/PoolNetwork.test.js.map +1 -1
- package/dist/entities/ShareClass.d.ts +27 -24
- package/dist/entities/ShareClass.d.ts.map +1 -1
- package/dist/entities/ShareClass.js +105 -63
- package/dist/entities/ShareClass.js.map +1 -1
- package/dist/entities/ShareClass.test.js +9 -8
- package/dist/entities/ShareClass.test.js.map +1 -1
- package/dist/entities/Vault.d.ts.map +1 -1
- package/dist/entities/Vault.js +5 -23
- package/dist/entities/Vault.js.map +1 -1
- package/dist/tests/setup.js +2 -2
- package/dist/tests/setup.js.map +1 -1
- package/dist/types/index.d.ts +4 -6
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ const centrifuge = new Centrifuge()
|
|
|
24
24
|
|
|
25
25
|
The following config options can be passed on initialization of the SDK:
|
|
26
26
|
|
|
27
|
-
- `environment: 'mainnet' | '
|
|
27
|
+
- `environment: 'mainnet' | 'testnet'`
|
|
28
28
|
- Optional
|
|
29
29
|
- Default value: `mainnet`
|
|
30
30
|
- `rpcUrls: Record<number, string>`
|
package/dist/Centrifuge.d.ts
CHANGED
|
@@ -6953,166 +6953,4 @@ export declare class Centrifuge {
|
|
|
6953
6953
|
assetDecimals(assetId: AssetId, chainId: number): Query<number>;
|
|
6954
6954
|
_queryIndexer<Result, Return>(query: string, variables: Record<string, any>, postProcess: (data: Result) => Return): Query<Return>;
|
|
6955
6955
|
}
|
|
6956
|
-
export declare const TEMP_DEPLOYMENTS: readonly [{
|
|
6957
|
-
readonly network: {
|
|
6958
|
-
readonly chainId: 11155111;
|
|
6959
|
-
readonly environment: "testnet";
|
|
6960
|
-
readonly centrifugeId: 1;
|
|
6961
|
-
readonly network: "ethereum";
|
|
6962
|
-
readonly etherscanUrl: "https://api-sepolia.etherscan.io/api";
|
|
6963
|
-
readonly connectsTo: readonly ["arbitrum-sepolia", "base-sepolia"];
|
|
6964
|
-
};
|
|
6965
|
-
readonly adapters: {
|
|
6966
|
-
readonly wormhole: {
|
|
6967
|
-
readonly wormholeId: "10002";
|
|
6968
|
-
readonly relayer: "0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470";
|
|
6969
|
-
readonly deploy: true;
|
|
6970
|
-
};
|
|
6971
|
-
readonly axelar: {
|
|
6972
|
-
readonly axelarId: "ethereum-sepolia";
|
|
6973
|
-
readonly gateway: "0xe432150cce91c13a887f7D836923d5597adD8E31";
|
|
6974
|
-
readonly gasService: "0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6";
|
|
6975
|
-
readonly deploy: true;
|
|
6976
|
-
};
|
|
6977
|
-
};
|
|
6978
|
-
readonly contracts: {
|
|
6979
|
-
readonly root: "0x6453C75B87852Eec5bDB5257C2fcb6c233F9fd0E";
|
|
6980
|
-
readonly guardian: "0x79419e5a6bDd4b709C3c02b46B20483675099619";
|
|
6981
|
-
readonly gasService: "0x588c02283dd3Ba23C0389480533Cb331C3D72E28";
|
|
6982
|
-
readonly gateway: "0x353a317bB82C69C4f7575879370D63CB372d2B83";
|
|
6983
|
-
readonly multiAdapter: "0x587Ed28F7d5d71A6254848B0870C3b21AABb0dA7";
|
|
6984
|
-
readonly messageProcessor: "0xA659572D933864965351ca84188Df993321aDD98";
|
|
6985
|
-
readonly messageDispatcher: "0x889Df3907f37ba3639432280196fC08CB3aaAD01";
|
|
6986
|
-
readonly hubRegistry: "0xEaAaedd16eD9435E3796340228CEda296F630ef3";
|
|
6987
|
-
readonly accounting: "0x99ec67Edce4058381806029BaCe7005B37F9CfB0";
|
|
6988
|
-
readonly holdings: "0x7b2D7f8f961cdc3718E455899A3779Db1b60EB7C";
|
|
6989
|
-
readonly shareClassManager: "0x7a943883873B46639c3F8FE0B81ED010CF6cEA4b";
|
|
6990
|
-
readonly hub: "0xC4f701841c8d4FC948EDF1658cE800C2790350eb";
|
|
6991
|
-
readonly identityValuation: "0x6Bcb240d3e1f1C4321ECAFFDacB45691DC03bE5D";
|
|
6992
|
-
readonly poolEscrowFactory: "0xE0bf3dAFe2b546aE18608dE988AaE1439868ce4d";
|
|
6993
|
-
readonly routerEscrow: "0xfCa8e874b908B97b034f69A57720B7Ac317eFD4E";
|
|
6994
|
-
readonly globalEscrow: "0xc9C0A8fa02F10D790E47CF7ED17A2C4A8852b15D";
|
|
6995
|
-
readonly freezeOnlyHook: "0x6C37c8536DA3Bd73D7AF4d6dE2371F6c5Bf282a4";
|
|
6996
|
-
readonly redemptionRestrictionsHook: "0xa72ecE5FcB7D559dCe839293D89992Bd20997AeB";
|
|
6997
|
-
readonly fullRestrictionsHook: "0x37FE09A48bBDae5Dbc479DE0D85F3c3D8279FbF9";
|
|
6998
|
-
readonly tokenFactory: "0xa1cbc70C7b45870b403BfF70861f70CC52EdDEAd";
|
|
6999
|
-
readonly asyncRequestManager: "0xefA2aa579b83BC2bc70DE4E84e916B7942A739f1";
|
|
7000
|
-
readonly syncManager: "0x24fB7024B7289322cFd4A03c9dd66Eebc10e4dA7";
|
|
7001
|
-
readonly asyncVaultFactory: "0x1C5F039CBe2d8bc63d9fF9d1bFdE0561a3efA5b5";
|
|
7002
|
-
readonly syncDepositVaultFactory: "0x0394C7f38c0b0e1cC9d835dD166eCB49A53f31e8";
|
|
7003
|
-
readonly spoke: "0x2e5613B4D8275AbdC82249873375EBA353431635";
|
|
7004
|
-
readonly vaultRouter: "0x9ce2423c8d6d0fEbCD596Ec94e5406782345729c";
|
|
7005
|
-
readonly balanceSheet: "0xD9c60d4318Abe64Be4d137CAc08f24B51388A1E3";
|
|
7006
|
-
readonly wormholeAdapter: "0xA77DF260E79fC0E9E2baaf5Fa7c4E8234210cCaD";
|
|
7007
|
-
readonly axelarAdapter: "0x3a10D135D00747e36eBb61Cb1554aF29f59675b5";
|
|
7008
|
-
};
|
|
7009
|
-
}, {
|
|
7010
|
-
readonly network: {
|
|
7011
|
-
readonly chainId: 421614;
|
|
7012
|
-
readonly environment: "testnet";
|
|
7013
|
-
readonly centrifugeId: 3;
|
|
7014
|
-
readonly network: "arbitrum";
|
|
7015
|
-
readonly etherscanUrl: "https://api-sepolia.arbiscan.io/api";
|
|
7016
|
-
readonly catapultaNetwork: "arbitrumSepolia";
|
|
7017
|
-
readonly connectsTo: readonly ["sepolia", "base-sepolia"];
|
|
7018
|
-
};
|
|
7019
|
-
readonly adapters: {
|
|
7020
|
-
readonly wormhole: {
|
|
7021
|
-
readonly wormholeId: "10003";
|
|
7022
|
-
readonly relayer: "0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470";
|
|
7023
|
-
readonly deploy: false;
|
|
7024
|
-
};
|
|
7025
|
-
readonly axelar: {
|
|
7026
|
-
readonly axelarId: "arbitrum-sepolia";
|
|
7027
|
-
readonly gateway: "0xe1cE95479C84e9809269227C7F8524aE051Ae77a";
|
|
7028
|
-
readonly gasService: "0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6";
|
|
7029
|
-
readonly deploy: true;
|
|
7030
|
-
};
|
|
7031
|
-
};
|
|
7032
|
-
readonly contracts: {
|
|
7033
|
-
readonly root: "0xD494AE8313Ef5368A4f43BAa963c039984de03B9";
|
|
7034
|
-
readonly guardian: "0x424315e2d5E5F85c6d944D9035Fcefa742E89F49";
|
|
7035
|
-
readonly gasService: "0x02C1A1ff76696FBcaC93450b79F8eEd544A36908";
|
|
7036
|
-
readonly gateway: "0x27dD1C01C57063487d022dB2A094eC7E55Eeb7bA";
|
|
7037
|
-
readonly multiAdapter: "0x4331A86E0E392b0e76752cEc54c2b67eDDCB247F";
|
|
7038
|
-
readonly messageProcessor: "0xb241107eA5a60aa6C1350ce0e531EFE96f60fBc3";
|
|
7039
|
-
readonly messageDispatcher: "0x30D32a13d2f5c0877e46bBC90673A5BEA97c4A9d";
|
|
7040
|
-
readonly hubRegistry: "0x92e20B218Ecfa62DEC6BD7032519f42903b0D051";
|
|
7041
|
-
readonly accounting: "0x7d929848Ca0D31a1bB655AEAc0395E6bf7eE57F4";
|
|
7042
|
-
readonly holdings: "0xCeF47646fc6bD862e74328366159BdE7D0BaCa8f";
|
|
7043
|
-
readonly shareClassManager: "0x8d597136BEC4B3a6399F14C521E06fbaF65621fB";
|
|
7044
|
-
readonly hub: "0x158Aba13c4FaA434F2e98184598873DC8bE062c4";
|
|
7045
|
-
readonly identityValuation: "0x6BF52A347248DA28777CB6cb588ABAc62Ae61e49";
|
|
7046
|
-
readonly poolEscrowFactory: "0x8aA080b9a16b4B08043CDe0dCc42801113dD3203";
|
|
7047
|
-
readonly routerEscrow: "0x47dC1B0fb5303B3498C1e1e5950632bD4a959029";
|
|
7048
|
-
readonly globalEscrow: "0xc7bA990F4B6B7a6B66249EA2046e16EAECd248d2";
|
|
7049
|
-
readonly freezeOnlyHook: "0xe690ba6334cA1F5552354B900E9D02e6Af8f335C";
|
|
7050
|
-
readonly redemptionRestrictionsHook: "0x2c33B751159f08dd6cF471DDCEec82828Cd95dD4";
|
|
7051
|
-
readonly fullRestrictionsHook: "0x1550b00E59cfB128D4076EA8CdE061fcE2806466";
|
|
7052
|
-
readonly tokenFactory: "0xdD0c9D22536DE1b2A9bCfa19EbD167CcA93659D8";
|
|
7053
|
-
readonly asyncRequestManager: "0xa9133c5c04c4211D84976b521a63532A41C31Af6";
|
|
7054
|
-
readonly syncManager: "0xB06889CE8A4f7840eeb8EE79B1f584369fa2Aa7C";
|
|
7055
|
-
readonly asyncVaultFactory: "0x0fC93dc1e66b329E1B50e5251E3Eef707ce15728";
|
|
7056
|
-
readonly syncDepositVaultFactory: "0x1a02aa3258fef51ddD34c60f365205af9b01443B";
|
|
7057
|
-
readonly spoke: "0xBDAB5Cf95e3f3D388aF1417CFf34470864454431";
|
|
7058
|
-
readonly vaultRouter: "0x6c0036c95d27442CBB78c8E8C284B93A7687Cf03";
|
|
7059
|
-
readonly balanceSheet: "0xf0b119b61C30f9EfBF1aB976327a33c601b05917";
|
|
7060
|
-
readonly axelarAdapter: "0x63320C1716F3B598DE9053F0343249a7E43634fe";
|
|
7061
|
-
readonly wormholeAdapter: "0x0";
|
|
7062
|
-
};
|
|
7063
|
-
}, {
|
|
7064
|
-
readonly network: {
|
|
7065
|
-
readonly chainId: 84532;
|
|
7066
|
-
readonly environment: "testnet";
|
|
7067
|
-
readonly centrifugeId: 2;
|
|
7068
|
-
readonly network: "base";
|
|
7069
|
-
readonly catapultaNetwork: "baseSepolia";
|
|
7070
|
-
readonly etherscanUrl: "https://api-sepolia.basescan.org/api";
|
|
7071
|
-
readonly connectsTo: readonly ["sepolia"];
|
|
7072
|
-
};
|
|
7073
|
-
readonly adapters: {
|
|
7074
|
-
readonly wormhole: {
|
|
7075
|
-
readonly wormholeId: "10004";
|
|
7076
|
-
readonly relayer: "0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE";
|
|
7077
|
-
readonly deploy: true;
|
|
7078
|
-
};
|
|
7079
|
-
readonly axelar: {
|
|
7080
|
-
readonly axelarId: "base-sepolia";
|
|
7081
|
-
readonly gateway: "0xe432150cce91c13a887f7D836923d5597adD8E31";
|
|
7082
|
-
readonly gasService: "0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6";
|
|
7083
|
-
readonly deploy: true;
|
|
7084
|
-
};
|
|
7085
|
-
};
|
|
7086
|
-
readonly contracts: {
|
|
7087
|
-
readonly root: "0x812D99c0bC8B7a74502871D73c401eb36039a181";
|
|
7088
|
-
readonly guardian: "0xF58d63966BabF0b0EdbD38917418756c4fa27Cca";
|
|
7089
|
-
readonly gasService: "0xBD6f23480DaA1ee28B1acfE51520Bdcf05eA880C";
|
|
7090
|
-
readonly gateway: "0x4d8C9dDB6A1B3C18E381c425d6F12438D472d900";
|
|
7091
|
-
readonly multiAdapter: "0xDd51383595f18577a5760C2726aFB3264d9C078F";
|
|
7092
|
-
readonly messageProcessor: "0x40828083cB78A165690FC81D5D13F3f7C02F1E72";
|
|
7093
|
-
readonly messageDispatcher: "0x54a74682da4A535dee99Ea936a457bF2659cBCBA";
|
|
7094
|
-
readonly hubRegistry: "0x5411368415C09A46624DA0c21af681b5A46E772a";
|
|
7095
|
-
readonly accounting: "0xdC62A9380bab5BB90954086Dc7Bb02ac95385f58";
|
|
7096
|
-
readonly holdings: "0xAEB0B9253fbB32ED05D442A3185eAB36DFCb65dF";
|
|
7097
|
-
readonly shareClassManager: "0xAFf6eB55ea716D9d2AeAA2f92dfa2fB18B6E8E53";
|
|
7098
|
-
readonly hub: "0x901eb3C1bb122C3E44C87597b8A73385e2b0986a";
|
|
7099
|
-
readonly identityValuation: "0x82a6BeC96F48Bf84a6948b1cb8b3Dd56990FC86A";
|
|
7100
|
-
readonly poolEscrowFactory: "0xea0213528de2851a5E9eEB0af41bEd8a1dD5A6ae";
|
|
7101
|
-
readonly routerEscrow: "0x1b376E6e1176dCAf5F1a95b7Fc3C81777a18dFA4";
|
|
7102
|
-
readonly globalEscrow: "0xAE3cf280db45af3Daf3db44f87Cd86F0f9cE8418";
|
|
7103
|
-
readonly freezeOnlyHook: "0xcF429dB019D0E461220f2375aB0a17E738804FA6";
|
|
7104
|
-
readonly redemptionRestrictionsHook: "0xeB38f1568881F5e9aE24Dc6c4cC72aa914A7CFb7";
|
|
7105
|
-
readonly fullRestrictionsHook: "0xF496fB53FF4EEdf402caD77a7C7E3DDDeBb8868e";
|
|
7106
|
-
readonly tokenFactory: "0x2473c4e384B587F8A246166A3f62dD61C7932b21";
|
|
7107
|
-
readonly asyncRequestManager: "0x4dc994F05aa257f34683AC53F5522D2aC80dBAce";
|
|
7108
|
-
readonly syncManager: "0xDf75Af2306f09dfECa802B7640580DE5D5e7C845";
|
|
7109
|
-
readonly asyncVaultFactory: "0x107cFf9bD6888e6D4bc7E3e66E56AE5950D73389";
|
|
7110
|
-
readonly syncDepositVaultFactory: "0x856c7173b6B7E72FaAb744049C9D9755F1c6a910";
|
|
7111
|
-
readonly spoke: "0xE86ba28E67317021ED1668Ac74f6aEcb58204D4a";
|
|
7112
|
-
readonly vaultRouter: "0xeCD41929C8bF8F81162fCDA3b3F7b355F290C8B2";
|
|
7113
|
-
readonly balanceSheet: "0xd2E92E0F3aEe2a267b62F894F652Bd0CafcFD3D8";
|
|
7114
|
-
readonly wormholeAdapter: "0x20476c2Ce241cB411A126E5cb0AA4f5881E1880a";
|
|
7115
|
-
readonly axelarAdapter: "0x7D1418c9074E2C55284Bc98525a4E8A5375DA5df";
|
|
7116
|
-
};
|
|
7117
|
-
}];
|
|
7118
6956
|
//# sourceMappingURL=Centrifuge.d.ts.map
|
package/dist/Centrifuge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Centrifuge.d.ts","sourceRoot":"","sources":["../src/Centrifuge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAiBtC,OAAO,
|
|
1
|
+
{"version":3,"file":"Centrifuge.d.ts","sourceRoot":"","sources":["../src/Centrifuge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAiBtC,OAAO,EAWL,KAAK,GAAG,EACR,KAAK,OAAO,IAAI,WAAW,EAC3B,KAAK,KAAK,EAGX,MAAM,MAAM,CAAA;AAKb,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,KAAK,EAEV,eAAe,EACf,aAAa,EAEb,SAAS,EAET,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAA0B,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,KAAK,EAAmB,MAAM,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAA;AACtG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAM3C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAgB,MAAM,kBAAkB,CAAA;AAsBhE,qBAAa,UAAU;;IAErB,IAAI,MAAM,kBAET;IAGD,SAAS,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;qrBA+Qf,CAAC;;;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,EAAE,MAAM;IAclB;;OAEG;IACH,KAAK;IAsBL,IAAI,CAAC,EAAE,EAAE,MAAM;IAYf;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC;IA8BrE,QAAQ,CAAC,OAAO,EAAE,SAAS;IAI3B;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM;;;;IAsC9D;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,SAAe;;;;;;;;IAkDtD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM;;;IAY1B;;;;;;OAMG;IACH,aAAa,CACX,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,EACzB,YAAY,EAAE,SAAS,EACvB,OAAO,GAAE,MAAM,GAAG,MAAU;IAqB9B;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;IA4I/C,aAAa,CAAC,MAAM,EAAE,MAAM,EAC1B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GACpC,KAAK,CAAC,MAAM,CAAC;CAkXjB"}
|
package/dist/Centrifuge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { combineLatest, concatWith, defaultIfEmpty, defer, filter, identity, isObservable, map, mergeMap, of, Subject, switchMap, using, } from 'rxjs';
|
|
2
2
|
import { fromFetch } from 'rxjs/fetch';
|
|
3
|
-
import { createPublicClient, createWalletClient, custom, encodeFunctionData, getContract, http, parseAbi, parseEventLogs, toHex, } from 'viem';
|
|
3
|
+
import { createPublicClient, createWalletClient, custom, encodeFunctionData, fallback, getContract, http, parseAbi, parseEventLogs, toHex, } from 'viem';
|
|
4
4
|
import { ABI } from './abi/index.js';
|
|
5
5
|
import { chainIdToNetwork, chains } from './config/chains.js';
|
|
6
6
|
import { currencies } from './config/protocol.js';
|
|
@@ -17,23 +17,12 @@ import { AssetId, PoolId, ShareClassId } from './utils/types.js';
|
|
|
17
17
|
const PINNING_API_DEMO = 'https://europe-central2-peak-vista-185616.cloudfunctions.net/pinning-api-demo';
|
|
18
18
|
const envConfig = {
|
|
19
19
|
mainnet: {
|
|
20
|
-
indexerUrl: 'https://api
|
|
21
|
-
alchemyKey: 'KNR-1LZhNqWOxZS2AN8AFeaiESBV10qZ',
|
|
22
|
-
infuraKey: '8ed99a9a115349bbbc01dcf3a24edc96',
|
|
20
|
+
indexerUrl: 'https://api.centrifuge.io',
|
|
23
21
|
ipfsUrl: 'https://centrifuge.mypinata.cloud',
|
|
24
22
|
...createPinning(PINNING_API_DEMO),
|
|
25
23
|
},
|
|
26
|
-
|
|
27
|
-
indexerUrl: 'https://api
|
|
28
|
-
alchemyKey: 'KNR-1LZhNqWOxZS2AN8AFeaiESBV10qZ',
|
|
29
|
-
infuraKey: '8cd8e043ee8d4001b97a1c37e08fd9dd',
|
|
30
|
-
ipfsUrl: 'https://centrifuge.mypinata.cloud',
|
|
31
|
-
...createPinning(PINNING_API_DEMO),
|
|
32
|
-
},
|
|
33
|
-
dev: {
|
|
34
|
-
indexerUrl: 'https://api-v3-hitz.marble.live/graphql',
|
|
35
|
-
alchemyKey: 'KNR-1LZhNqWOxZS2AN8AFeaiESBV10qZ',
|
|
36
|
-
infuraKey: '8cd8e043ee8d4001b97a1c37e08fd9dd',
|
|
24
|
+
testnet: {
|
|
25
|
+
indexerUrl: 'https://api.centrifuge.io',
|
|
37
26
|
ipfsUrl: 'https://centrifuge.mypinata.cloud',
|
|
38
27
|
...createPinning(PINNING_API_DEMO),
|
|
39
28
|
},
|
|
@@ -85,7 +74,7 @@ export class Centrifuge {
|
|
|
85
74
|
}
|
|
86
75
|
this.#clients.set(chain.id, createPublicClient({
|
|
87
76
|
chain,
|
|
88
|
-
transport: http(rpcUrl),
|
|
77
|
+
transport: Array.isArray(rpcUrl) ? fallback(rpcUrl.map((url) => http(url))) : http(rpcUrl),
|
|
89
78
|
batch: { multicall: true },
|
|
90
79
|
pollingInterval: this.#config.pollingInterval,
|
|
91
80
|
cacheTime: 100,
|
|
@@ -402,6 +391,46 @@ export class Centrifuge {
|
|
|
402
391
|
args: [assetId.raw],
|
|
403
392
|
}))));
|
|
404
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* Get the allowance of an ERC20 or ERC6909 token.
|
|
396
|
+
* which is the contract that moves funds into the vault on behalf of the investor.
|
|
397
|
+
* @param owner - The address of the owner
|
|
398
|
+
* @param spender - The address of the spender
|
|
399
|
+
* @param chainId - The chain ID where the asset is located
|
|
400
|
+
* @param asset - The address of the asset
|
|
401
|
+
* @param tokenId - Optional token ID for ERC6909 assets
|
|
402
|
+
* @internal
|
|
403
|
+
*/
|
|
404
|
+
_allowance(owner, spender, chainId, asset, tokenId) {
|
|
405
|
+
return this._query(['allowance', owner.toLowerCase(), spender.toLowerCase(), asset.toLowerCase(), chainId, tokenId], () => defer(async () => {
|
|
406
|
+
const client = this.getClient(chainId);
|
|
407
|
+
if (tokenId) {
|
|
408
|
+
return client.readContract({
|
|
409
|
+
address: asset,
|
|
410
|
+
abi: ABI.ERC6909,
|
|
411
|
+
functionName: 'allowance',
|
|
412
|
+
args: [owner, spender, tokenId],
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return client.readContract({
|
|
416
|
+
address: asset,
|
|
417
|
+
abi: ABI.Currency,
|
|
418
|
+
functionName: 'allowance',
|
|
419
|
+
args: [owner, spender],
|
|
420
|
+
});
|
|
421
|
+
}).pipe(repeatOnEvents(this, {
|
|
422
|
+
address: asset,
|
|
423
|
+
abi: [ABI.Currency, ABI.ERC6909],
|
|
424
|
+
eventName: ['Approval', 'Transfer'],
|
|
425
|
+
filter: (events) => {
|
|
426
|
+
return events.some((event) => {
|
|
427
|
+
return (event.args.owner?.toLowerCase() === owner.toLowerCase() ||
|
|
428
|
+
event.args.spender?.toLowerCase() === owner.toLowerCase() ||
|
|
429
|
+
event.args.from?.toLowerCase() === owner.toLowerCase());
|
|
430
|
+
});
|
|
431
|
+
},
|
|
432
|
+
}, chainId)));
|
|
433
|
+
}
|
|
405
434
|
/**
|
|
406
435
|
* Returns an observable of all events on a given chain.
|
|
407
436
|
* @internal
|
|
@@ -578,6 +607,7 @@ export class Centrifuge {
|
|
|
578
607
|
? shareReplayWithDelayedReset({
|
|
579
608
|
bufferSize: cache ? 1 : 0,
|
|
580
609
|
resetDelay: cache ? obsCacheTime : 0,
|
|
610
|
+
// TODO: Fix valueCacheTime to not cause an infinite loop when the value is expired.
|
|
581
611
|
// windowTime: options?.valueCacheTime ?? Infinity,
|
|
582
612
|
})
|
|
583
613
|
: map((val) => val));
|
|
@@ -640,7 +670,7 @@ export class Centrifuge {
|
|
|
640
670
|
const publicClient = self.getClient(chainId);
|
|
641
671
|
const chain = self.getChainConfig(chainId);
|
|
642
672
|
const bareWalletClient = isLocalAccount(signer)
|
|
643
|
-
? createWalletClient({ account: signer, chain, transport: http(
|
|
673
|
+
? createWalletClient({ account: signer, chain, transport: http() })
|
|
644
674
|
: createWalletClient({ transport: custom(signer) });
|
|
645
675
|
const [address] = await bareWalletClient.getAddresses();
|
|
646
676
|
if (!address)
|
|
@@ -682,28 +712,59 @@ export class Centrifuge {
|
|
|
682
712
|
}
|
|
683
713
|
/** @internal */
|
|
684
714
|
_protocolAddresses(chainId) {
|
|
685
|
-
return this._query(
|
|
715
|
+
return this._query(null, () => {
|
|
686
716
|
const network = chainIdToNetwork[chainId];
|
|
687
717
|
const chainCurrencies = currencies[chainId];
|
|
688
718
|
if (!network || !chainCurrencies) {
|
|
689
|
-
throw new Error(`No protocol config
|
|
719
|
+
throw new Error(`No protocol config found for chain id ${chainId}`);
|
|
690
720
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
721
|
+
return this._queryIndexer(`{
|
|
722
|
+
deployments {
|
|
723
|
+
items {
|
|
724
|
+
accounting
|
|
725
|
+
asyncRequestManager
|
|
726
|
+
asyncVaultFactory
|
|
727
|
+
axelarAdapter
|
|
728
|
+
balanceSheet
|
|
729
|
+
centrifugeId
|
|
730
|
+
chainId
|
|
731
|
+
freezeOnlyHook
|
|
732
|
+
fullRestrictionsHook
|
|
733
|
+
gasService
|
|
734
|
+
gateway
|
|
735
|
+
globalEscrow
|
|
736
|
+
guardian
|
|
737
|
+
holdings
|
|
738
|
+
hub
|
|
739
|
+
hubRegistry
|
|
740
|
+
identityValuation
|
|
741
|
+
messageDispatcher
|
|
742
|
+
messageProcessor
|
|
743
|
+
multiAdapter
|
|
744
|
+
poolEscrowFactory
|
|
745
|
+
redemptionRestrictionsHook
|
|
746
|
+
root
|
|
747
|
+
routerEscrow
|
|
748
|
+
shareClassManager
|
|
749
|
+
spoke
|
|
750
|
+
syncDepositVaultFactory
|
|
751
|
+
syncManager
|
|
752
|
+
wormholeAdapter
|
|
753
|
+
vaultRouter
|
|
754
|
+
tokenFactory
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}`, { chainId: String(chainId) }, (data) => {
|
|
758
|
+
const deployment = data.deployments.items.find((d) => d.chainId === String(chainId));
|
|
759
|
+
if (!deployment) {
|
|
760
|
+
throw new Error(`No protocol contracts found for chain id ${chainId}`);
|
|
701
761
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
762
|
+
delete deployment.chainId;
|
|
763
|
+
return {
|
|
764
|
+
...deployment,
|
|
765
|
+
currencies: chainCurrencies,
|
|
766
|
+
};
|
|
767
|
+
});
|
|
707
768
|
});
|
|
708
769
|
}
|
|
709
770
|
/** @internal */
|
|
@@ -744,170 +805,4 @@ export class Centrifuge {
|
|
|
744
805
|
})));
|
|
745
806
|
}
|
|
746
807
|
}
|
|
747
|
-
export const TEMP_DEPLOYMENTS = [
|
|
748
|
-
{
|
|
749
|
-
network: {
|
|
750
|
-
chainId: 11155111,
|
|
751
|
-
environment: 'testnet',
|
|
752
|
-
centrifugeId: 1,
|
|
753
|
-
network: 'ethereum',
|
|
754
|
-
etherscanUrl: 'https://api-sepolia.etherscan.io/api',
|
|
755
|
-
connectsTo: ['arbitrum-sepolia', 'base-sepolia'],
|
|
756
|
-
},
|
|
757
|
-
adapters: {
|
|
758
|
-
wormhole: {
|
|
759
|
-
wormholeId: '10002',
|
|
760
|
-
relayer: '0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470',
|
|
761
|
-
deploy: true,
|
|
762
|
-
},
|
|
763
|
-
axelar: {
|
|
764
|
-
axelarId: 'ethereum-sepolia',
|
|
765
|
-
gateway: '0xe432150cce91c13a887f7D836923d5597adD8E31',
|
|
766
|
-
gasService: '0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6',
|
|
767
|
-
deploy: true,
|
|
768
|
-
},
|
|
769
|
-
},
|
|
770
|
-
contracts: {
|
|
771
|
-
root: '0x6453C75B87852Eec5bDB5257C2fcb6c233F9fd0E',
|
|
772
|
-
guardian: '0x79419e5a6bDd4b709C3c02b46B20483675099619',
|
|
773
|
-
gasService: '0x588c02283dd3Ba23C0389480533Cb331C3D72E28',
|
|
774
|
-
gateway: '0x353a317bB82C69C4f7575879370D63CB372d2B83',
|
|
775
|
-
multiAdapter: '0x587Ed28F7d5d71A6254848B0870C3b21AABb0dA7',
|
|
776
|
-
messageProcessor: '0xA659572D933864965351ca84188Df993321aDD98',
|
|
777
|
-
messageDispatcher: '0x889Df3907f37ba3639432280196fC08CB3aaAD01',
|
|
778
|
-
hubRegistry: '0xEaAaedd16eD9435E3796340228CEda296F630ef3',
|
|
779
|
-
accounting: '0x99ec67Edce4058381806029BaCe7005B37F9CfB0',
|
|
780
|
-
holdings: '0x7b2D7f8f961cdc3718E455899A3779Db1b60EB7C',
|
|
781
|
-
shareClassManager: '0x7a943883873B46639c3F8FE0B81ED010CF6cEA4b',
|
|
782
|
-
hub: '0xC4f701841c8d4FC948EDF1658cE800C2790350eb',
|
|
783
|
-
identityValuation: '0x6Bcb240d3e1f1C4321ECAFFDacB45691DC03bE5D',
|
|
784
|
-
poolEscrowFactory: '0xE0bf3dAFe2b546aE18608dE988AaE1439868ce4d',
|
|
785
|
-
routerEscrow: '0xfCa8e874b908B97b034f69A57720B7Ac317eFD4E',
|
|
786
|
-
globalEscrow: '0xc9C0A8fa02F10D790E47CF7ED17A2C4A8852b15D',
|
|
787
|
-
freezeOnlyHook: '0x6C37c8536DA3Bd73D7AF4d6dE2371F6c5Bf282a4',
|
|
788
|
-
redemptionRestrictionsHook: '0xa72ecE5FcB7D559dCe839293D89992Bd20997AeB',
|
|
789
|
-
fullRestrictionsHook: '0x37FE09A48bBDae5Dbc479DE0D85F3c3D8279FbF9',
|
|
790
|
-
tokenFactory: '0xa1cbc70C7b45870b403BfF70861f70CC52EdDEAd',
|
|
791
|
-
asyncRequestManager: '0xefA2aa579b83BC2bc70DE4E84e916B7942A739f1',
|
|
792
|
-
syncManager: '0x24fB7024B7289322cFd4A03c9dd66Eebc10e4dA7',
|
|
793
|
-
asyncVaultFactory: '0x1C5F039CBe2d8bc63d9fF9d1bFdE0561a3efA5b5',
|
|
794
|
-
syncDepositVaultFactory: '0x0394C7f38c0b0e1cC9d835dD166eCB49A53f31e8',
|
|
795
|
-
spoke: '0x2e5613B4D8275AbdC82249873375EBA353431635',
|
|
796
|
-
vaultRouter: '0x9ce2423c8d6d0fEbCD596Ec94e5406782345729c',
|
|
797
|
-
balanceSheet: '0xD9c60d4318Abe64Be4d137CAc08f24B51388A1E3',
|
|
798
|
-
wormholeAdapter: '0xA77DF260E79fC0E9E2baaf5Fa7c4E8234210cCaD',
|
|
799
|
-
axelarAdapter: '0x3a10D135D00747e36eBb61Cb1554aF29f59675b5',
|
|
800
|
-
},
|
|
801
|
-
},
|
|
802
|
-
{
|
|
803
|
-
network: {
|
|
804
|
-
chainId: 421614,
|
|
805
|
-
environment: 'testnet',
|
|
806
|
-
centrifugeId: 3,
|
|
807
|
-
network: 'arbitrum',
|
|
808
|
-
etherscanUrl: 'https://api-sepolia.arbiscan.io/api',
|
|
809
|
-
catapultaNetwork: 'arbitrumSepolia',
|
|
810
|
-
connectsTo: ['sepolia', 'base-sepolia'],
|
|
811
|
-
},
|
|
812
|
-
adapters: {
|
|
813
|
-
wormhole: {
|
|
814
|
-
wormholeId: '10003',
|
|
815
|
-
relayer: '0x7B1bD7a6b4E61c2a123AC6BC2cbfC614437D0470',
|
|
816
|
-
deploy: false,
|
|
817
|
-
},
|
|
818
|
-
axelar: {
|
|
819
|
-
axelarId: 'arbitrum-sepolia',
|
|
820
|
-
gateway: '0xe1cE95479C84e9809269227C7F8524aE051Ae77a',
|
|
821
|
-
gasService: '0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6',
|
|
822
|
-
deploy: true,
|
|
823
|
-
},
|
|
824
|
-
},
|
|
825
|
-
contracts: {
|
|
826
|
-
root: '0xD494AE8313Ef5368A4f43BAa963c039984de03B9',
|
|
827
|
-
guardian: '0x424315e2d5E5F85c6d944D9035Fcefa742E89F49',
|
|
828
|
-
gasService: '0x02C1A1ff76696FBcaC93450b79F8eEd544A36908',
|
|
829
|
-
gateway: '0x27dD1C01C57063487d022dB2A094eC7E55Eeb7bA',
|
|
830
|
-
multiAdapter: '0x4331A86E0E392b0e76752cEc54c2b67eDDCB247F',
|
|
831
|
-
messageProcessor: '0xb241107eA5a60aa6C1350ce0e531EFE96f60fBc3',
|
|
832
|
-
messageDispatcher: '0x30D32a13d2f5c0877e46bBC90673A5BEA97c4A9d',
|
|
833
|
-
hubRegistry: '0x92e20B218Ecfa62DEC6BD7032519f42903b0D051',
|
|
834
|
-
accounting: '0x7d929848Ca0D31a1bB655AEAc0395E6bf7eE57F4',
|
|
835
|
-
holdings: '0xCeF47646fc6bD862e74328366159BdE7D0BaCa8f',
|
|
836
|
-
shareClassManager: '0x8d597136BEC4B3a6399F14C521E06fbaF65621fB',
|
|
837
|
-
hub: '0x158Aba13c4FaA434F2e98184598873DC8bE062c4',
|
|
838
|
-
identityValuation: '0x6BF52A347248DA28777CB6cb588ABAc62Ae61e49',
|
|
839
|
-
poolEscrowFactory: '0x8aA080b9a16b4B08043CDe0dCc42801113dD3203',
|
|
840
|
-
routerEscrow: '0x47dC1B0fb5303B3498C1e1e5950632bD4a959029',
|
|
841
|
-
globalEscrow: '0xc7bA990F4B6B7a6B66249EA2046e16EAECd248d2',
|
|
842
|
-
freezeOnlyHook: '0xe690ba6334cA1F5552354B900E9D02e6Af8f335C',
|
|
843
|
-
redemptionRestrictionsHook: '0x2c33B751159f08dd6cF471DDCEec82828Cd95dD4',
|
|
844
|
-
fullRestrictionsHook: '0x1550b00E59cfB128D4076EA8CdE061fcE2806466',
|
|
845
|
-
tokenFactory: '0xdD0c9D22536DE1b2A9bCfa19EbD167CcA93659D8',
|
|
846
|
-
asyncRequestManager: '0xa9133c5c04c4211D84976b521a63532A41C31Af6',
|
|
847
|
-
syncManager: '0xB06889CE8A4f7840eeb8EE79B1f584369fa2Aa7C',
|
|
848
|
-
asyncVaultFactory: '0x0fC93dc1e66b329E1B50e5251E3Eef707ce15728',
|
|
849
|
-
syncDepositVaultFactory: '0x1a02aa3258fef51ddD34c60f365205af9b01443B',
|
|
850
|
-
spoke: '0xBDAB5Cf95e3f3D388aF1417CFf34470864454431',
|
|
851
|
-
vaultRouter: '0x6c0036c95d27442CBB78c8E8C284B93A7687Cf03',
|
|
852
|
-
balanceSheet: '0xf0b119b61C30f9EfBF1aB976327a33c601b05917',
|
|
853
|
-
axelarAdapter: '0x63320C1716F3B598DE9053F0343249a7E43634fe',
|
|
854
|
-
wormholeAdapter: '0x0',
|
|
855
|
-
},
|
|
856
|
-
},
|
|
857
|
-
{
|
|
858
|
-
network: {
|
|
859
|
-
chainId: 84532,
|
|
860
|
-
environment: 'testnet',
|
|
861
|
-
centrifugeId: 2,
|
|
862
|
-
network: 'base',
|
|
863
|
-
catapultaNetwork: 'baseSepolia',
|
|
864
|
-
etherscanUrl: 'https://api-sepolia.basescan.org/api',
|
|
865
|
-
connectsTo: ['sepolia'],
|
|
866
|
-
},
|
|
867
|
-
adapters: {
|
|
868
|
-
wormhole: {
|
|
869
|
-
wormholeId: '10004',
|
|
870
|
-
relayer: '0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE',
|
|
871
|
-
deploy: true,
|
|
872
|
-
},
|
|
873
|
-
axelar: {
|
|
874
|
-
axelarId: 'base-sepolia',
|
|
875
|
-
gateway: '0xe432150cce91c13a887f7D836923d5597adD8E31',
|
|
876
|
-
gasService: '0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6',
|
|
877
|
-
deploy: true,
|
|
878
|
-
},
|
|
879
|
-
},
|
|
880
|
-
contracts: {
|
|
881
|
-
root: '0x812D99c0bC8B7a74502871D73c401eb36039a181',
|
|
882
|
-
guardian: '0xF58d63966BabF0b0EdbD38917418756c4fa27Cca',
|
|
883
|
-
gasService: '0xBD6f23480DaA1ee28B1acfE51520Bdcf05eA880C',
|
|
884
|
-
gateway: '0x4d8C9dDB6A1B3C18E381c425d6F12438D472d900',
|
|
885
|
-
multiAdapter: '0xDd51383595f18577a5760C2726aFB3264d9C078F',
|
|
886
|
-
messageProcessor: '0x40828083cB78A165690FC81D5D13F3f7C02F1E72',
|
|
887
|
-
messageDispatcher: '0x54a74682da4A535dee99Ea936a457bF2659cBCBA',
|
|
888
|
-
hubRegistry: '0x5411368415C09A46624DA0c21af681b5A46E772a',
|
|
889
|
-
accounting: '0xdC62A9380bab5BB90954086Dc7Bb02ac95385f58',
|
|
890
|
-
holdings: '0xAEB0B9253fbB32ED05D442A3185eAB36DFCb65dF',
|
|
891
|
-
shareClassManager: '0xAFf6eB55ea716D9d2AeAA2f92dfa2fB18B6E8E53',
|
|
892
|
-
hub: '0x901eb3C1bb122C3E44C87597b8A73385e2b0986a',
|
|
893
|
-
identityValuation: '0x82a6BeC96F48Bf84a6948b1cb8b3Dd56990FC86A',
|
|
894
|
-
poolEscrowFactory: '0xea0213528de2851a5E9eEB0af41bEd8a1dD5A6ae',
|
|
895
|
-
routerEscrow: '0x1b376E6e1176dCAf5F1a95b7Fc3C81777a18dFA4',
|
|
896
|
-
globalEscrow: '0xAE3cf280db45af3Daf3db44f87Cd86F0f9cE8418',
|
|
897
|
-
freezeOnlyHook: '0xcF429dB019D0E461220f2375aB0a17E738804FA6',
|
|
898
|
-
redemptionRestrictionsHook: '0xeB38f1568881F5e9aE24Dc6c4cC72aa914A7CFb7',
|
|
899
|
-
fullRestrictionsHook: '0xF496fB53FF4EEdf402caD77a7C7E3DDDeBb8868e',
|
|
900
|
-
tokenFactory: '0x2473c4e384B587F8A246166A3f62dD61C7932b21',
|
|
901
|
-
asyncRequestManager: '0x4dc994F05aa257f34683AC53F5522D2aC80dBAce',
|
|
902
|
-
syncManager: '0xDf75Af2306f09dfECa802B7640580DE5D5e7C845',
|
|
903
|
-
asyncVaultFactory: '0x107cFf9bD6888e6D4bc7E3e66E56AE5950D73389',
|
|
904
|
-
syncDepositVaultFactory: '0x856c7173b6B7E72FaAb744049C9D9755F1c6a910',
|
|
905
|
-
spoke: '0xE86ba28E67317021ED1668Ac74f6aEcb58204D4a',
|
|
906
|
-
vaultRouter: '0xeCD41929C8bF8F81162fCDA3b3F7b355F290C8B2',
|
|
907
|
-
balanceSheet: '0xd2E92E0F3aEe2a267b62F894F652Bd0CafcFD3D8',
|
|
908
|
-
wormholeAdapter: '0x20476c2Ce241cB411A126E5cb0AA4f5881E1880a',
|
|
909
|
-
axelarAdapter: '0x7D1418c9074E2C55284Bc98525a4E8A5375DA5df',
|
|
910
|
-
},
|
|
911
|
-
},
|
|
912
|
-
];
|
|
913
808
|
//# sourceMappingURL=Centrifuge.js.map
|